Closed romandecker closed 3 years ago
Did some more investigation and figured out what the issue is:
maintenanceInterval
has ticked once. This defaults to 60 seconds.Not sure if I would still consider this a bug... I'll leave it up to you to close ;)
I would definitely echo this as a bug. In normal operations, waiting for 60 seconds might be fine, but when we run in in tests, 60 seconds to wait for the test is not something we'd like to do. We are still on the last major version of pgboss (before the introduction of timekeep) because of this. Maybe there is a way to start pgboss without timekeep in tests?
There is actually, we pass these options to PgBoss in our tests:
{
noSupervisor: true,
noScheduling: true
}
Thanks @romandecker that pretty much solved our problems. Would love this to be documented a bit more prominently as it is the first thing you encounter as a problem when you write a test.
Hey there!
thanks for this great library! I've found an issue that pg-boss never seems to free the pg-pool when scheduling is enabled. The following snippet never exits:
If I pass
noScheduling: true
, it will properly exit, however, as soon as I do anything with pg-boss (like callgetQueueSize
for example, it will hang again, even withnoScheduling
set: