Просмотр исходного кода

revert: tau: save the task before pushing notification, caused bug in notifications where no task_event appears to be updated

dasman 1 год назад
Родитель
Сommit
67a641732e
1 измененных файлов с 2 добавлено и 1 удалено
  1. 2 1
      bin/tau/taud/src/main.rs

+ 2 - 1
bin/tau/taud/src/main.rs

@@ -377,7 +377,6 @@ async fn on_receive_task(
         info!(target: "taud", "Save the task: ref: {}", task.ref_id);
         task.workspace.clone_from(ws_name);
         let datastore_path = expand_path(&settings.datastore)?;
-        task.save(&datastore_path)?;
 
         // Push a notification to a fifo if set
         if settings.piped {
@@ -413,6 +412,8 @@ async fn on_receive_task(
                 }
             }
         }
+
+        task.save(&datastore_path)?;
     }
     Ok(())
 }