Skip to content

Commit 5c50da2

Browse files
committed
Add Labels to Error Logs to Better Determine Failure Point
1 parent 5e80ff8 commit 5c50da2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/worker.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ pub async fn work_loop(
268268
let job: Item = match queue.get_job().await {
269269
Ok(job) => job,
270270
Err(err) => {
271-
error!("{}", err);
271+
error!("Failed to Get Job: {}", err);
272272
continue;
273273
}
274274
};
@@ -279,11 +279,11 @@ pub async fn work_loop(
279279
}
280280
// Drop a job that should be retried - it will be returned to the work queue after
281281
// the (5 second) lease expires.
282-
Err(err) if err.should_retry => error!("{}", err.msg),
282+
Err(err) if err.should_retry => error!("Job Failed: {}, Retrying", err.msg),
283283
// Errors that shouldn't cause a retry should mark the job as complete so it isn't
284284
// tried again.
285285
Err(err) => {
286-
error!("{}", err.msg);
286+
error!("Job Failed: {}, Not Retrying", err.msg);
287287
queue.complete(&job).await?;
288288
}
289289
}

0 commit comments

Comments
 (0)