You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I'm using PGBoss in a setup that uses external job fulfillers, so I expose a REST API that includes things like getNextJob(queueName) and complete(jobId).
I want to be able to build a monitoring solution on top of this. The monitor should be able to know that no worker has taken a job from a queue, by finding out that the next pending job on the AAA queue was created more than an hour ago.
boss.getQueueSize() gives us the number of projects in the queue, but not how long ago it was created.
fetch() gives me the job information, but also acts as a worker and removes the job from a pending state.
Is there a "peek" option (very common in queues) that allows me to get the information of the next job in a queue, without dequeuing it?
The text was updated successfully, but these errors were encountered:
There's not a peek() api in pg-boss, so you will need to build this yourself until it exists. Since pg-boss is also a priority queue, the fetch order isn't always creation date if you opt into creating higher priority jobs that can jump to the front of the queue. Keep that in mind if you decide to set this up via a custom SQL solution in the interim of this feature existing.
Hi,
I'm using PGBoss in a setup that uses external job fulfillers, so I expose a REST API that includes things like getNextJob(queueName) and complete(jobId).
I want to be able to build a monitoring solution on top of this. The monitor should be able to know that no worker has taken a job from a queue, by finding out that the next pending job on the AAA queue was created more than an hour ago.
boss.getQueueSize() gives us the number of projects in the queue, but not how long ago it was created.
fetch() gives me the job information, but also acts as a worker and removes the job from a pending state.
Is there a "peek" option (very common in queues) that allows me to get the information of the next job in a queue, without dequeuing it?
The text was updated successfully, but these errors were encountered: