File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -192,7 +192,10 @@ export default class Scheduler {
192192 release : ( ) => void
193193 ) => {
194194 if ( err ) {
195- log . error ( 'Error connecting with notify listener' ) ;
195+ log . error ( 'Error connecting with notify listener' , err ) ;
196+ if ( err . stack ) {
197+ log . debug ( err . stack ) ;
198+ }
196199 // Try again in 5 seconds
197200 // should this really be done in the node process?
198201 setTimeout ( this . listen , 5000 ) ;
@@ -207,7 +210,10 @@ export default class Scheduler {
207210 } ) ;
208211 client . query ( 'LISTEN "scheduled_jobs:insert"' ) ;
209212 client . on ( 'error' , ( e : unknown ) => {
210- log . error ( 'Error with database notify listener' ) ;
213+ log . error ( 'Error with database notify listener' , e ) ;
214+ if ( e instanceof Error && e . stack ) {
215+ log . debug ( e . stack ) ;
216+ }
211217 release ( ) ;
212218 this . listen ( ) ;
213219 } ) ;
Original file line number Diff line number Diff line change @@ -176,7 +176,10 @@ export default class Worker {
176176 release : ( ) => void
177177 ) => {
178178 if ( err ) {
179- log . error ( 'Error connecting with notify listener' ) ;
179+ log . error ( 'Error connecting with notify listener' , err ) ;
180+ if ( err . stack ) {
181+ log . debug ( err . stack ) ;
182+ }
180183 // Try again in 5 seconds
181184 // should this really be done in the node process?
182185 setTimeout ( this . listen , 5000 ) ;
@@ -190,7 +193,10 @@ export default class Worker {
190193 } ) ;
191194 client . query ( 'LISTEN "jobs:insert"' ) ;
192195 client . on ( 'error' , ( e : unknown ) => {
193- log . error ( 'Error with database notify listener' ) ;
196+ log . error ( 'Error with database notify listener' , e ) ;
197+ if ( e instanceof Error && e . stack ) {
198+ log . debug ( e . stack ) ;
199+ }
194200 release ( ) ;
195201 this . listen ( ) ;
196202 } ) ;
You can’t perform that action at this time.
0 commit comments