mirror of
https://github.com/watchexec/watchexec.git
synced 2024-11-13 07:41:11 +01:00
Prep for more handlers in action
This commit is contained in:
parent
4843920a36
commit
05117e69fe
1 changed files with 3 additions and 3 deletions
|
@ -147,7 +147,7 @@ pub async fn worker(
|
|||
) -> Result<(), CriticalError> {
|
||||
let mut last = Instant::now();
|
||||
let mut set = Vec::new();
|
||||
let mut handler =
|
||||
let mut action_handler =
|
||||
{ working.borrow().action_handler.take() }.ok_or(CriticalError::MissingHandler)?;
|
||||
let mut process: Option<Process> = None;
|
||||
|
||||
|
@ -184,11 +184,11 @@ pub async fn worker(
|
|||
|
||||
if let Some(h) = working.borrow().action_handler.take() {
|
||||
trace!("action handler updated");
|
||||
handler = h;
|
||||
action_handler = h;
|
||||
}
|
||||
|
||||
let outcome = action.outcome.clone();
|
||||
let err = handler.handle(action).map_err(|e| rte("action worker", e));
|
||||
let err = action_handler.handle(action).map_err(|e| rte("action worker", e));
|
||||
if let Err(err) = err {
|
||||
errors.send(err).await?;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue