File tree Expand file tree Collapse file tree 1 file changed +11
-9
lines changed
packages/redis-worker/src Expand file tree Collapse file tree 1 file changed +11
-9
lines changed Original file line number Diff line number Diff line change @@ -621,15 +621,17 @@ class Worker<TCatalog extends WorkerCatalog> {
621621 const retryDelay = calculateNextRetryDelay ( retrySettings , newAttempt ) ;
622622
623623 if ( ! retryDelay ) {
624- this . logger . error ( `Worker item reached max attempts. Moving to DLQ.` , {
625- name : this . options . name ,
626- id,
627- job,
628- item,
629- visibilityTimeoutMs,
630- attempt : newAttempt ,
631- errorMessage,
632- } ) ;
624+ if ( shouldLogError ) {
625+ this . logger . error ( `Worker item reached max attempts. Moving to DLQ.` , {
626+ ...logAttributes ,
627+ attempt : newAttempt ,
628+ } ) ;
629+ } else {
630+ this . logger . info ( `Worker item reached max attempts. Moving to DLQ.` , {
631+ ...logAttributes ,
632+ attempt : newAttempt ,
633+ } ) ;
634+ }
633635
634636 await this . queue . moveToDeadLetterQueue ( id , errorMessage ) ;
635637
You can’t perform that action at this time.
0 commit comments