I'm building a dashboard for pg-boss pgboss-ui[WIP].
I'm trying to listen on wip events to get the worker state but the wip events are not being emitted.
I'm getting monitor-state events but not wip events, based on the docs they should be emitted every 2 secs when there are active jobs or am I missing something ?
// This doesn't have any queues running on it, it's purely for collecting stats
// await queue.start() is triggered during startup in a different place
import PgBoss = require('pg-boss');
import { environment } from './environments/environment';
const queue: PgBoss = new PgBoss({
connectionString: environment.pgboss_database_url,
monitorStateIntervalSeconds: 5,
});
queue.on('error', (error) => {
console.error(`Queue Error`, error);
});
queue.on('wip', (data: PgBoss.Worker[]) => {
console.log('WIP', data);
// process WIP event data
});
This is a great package, I've been using it on my side projects for a while. Thank you :+1:
I'm building a dashboard for pg-boss pgboss-ui [WIP].
I'm trying to listen on
wip
events to get the worker state but thewip
events are not being emitted.I'm getting
monitor-state
events but notwip
events, based on the docs they should be emitted every 2 secs when there are active jobs or am I missing something ?This is a great package, I've been using it on my side projects for a while. Thank you :+1: