Skip to content

Commit 0bd0179

Browse files
TuntiiCopilot
andauthored
Apply suggestion from @Copilot
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent b670a33 commit 0bd0179

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

docs/cookbook/src/crates/rustapi_jobs.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,9 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
6969
// 4. Start the worker in the background
7070
let worker_queue = queue.clone();
7171
tokio::spawn(async move {
72-
worker_queue.start_worker().await;
72+
if let Err(e) = worker_queue.start_worker().await {
73+
eprintln!("Worker failed: {:?}", e);
74+
}
7375
});
7476

7577
// 5. Enqueue a job (pass the DATA, not the handler)

0 commit comments

Comments
 (0)