fix: also dispatch right away

This commit is contained in:
əlemi 2024-09-19 17:20:17 +02:00
parent 9a260a14c3
commit 205b729f16
Signed by: alemi
GPG key ID: A4895B84D311642C
2 changed files with 3 additions and 1 deletions

View file

@ -72,7 +72,7 @@ pub async fn post(
model::job::Entity::insert(job).exec(ctx.db()).await?; model::job::Entity::insert(job).exec(ctx.db()).await?;
ctx.wake_workers(); ctx.wake_workers(); // process immediately
Ok(CreationResult(aid)) Ok(CreationResult(aid))
} }

View file

@ -148,5 +148,7 @@ pub async fn process(ctx: Context, job: &model::job::Model) -> crate::JobResult<
tx.commit().await?; tx.commit().await?;
ctx.wake_workers(); // dispatch immediately
Ok(()) Ok(())
} }