Closed jianinz closed 1 year ago
Welcome! The tables are stored in a schema named pgboss. You're probably looking for the tables in the public schema. In the latter example, you should be using work and not subscribe if you want that callback to run every minute like you have in your cron.
Thanks @timgit! I now found the tables in the pgboss schema. Although I don't quite get why using subscribe function won't execute the callback in the above example?
I changed the code to the following just for testing purpose, but no console log when subscription happens
await boss.schedule('analytics', `* * * * *`);
await boss.subscribe('analytics', async (job) => {
console.log(`Subscription is running: ${new Date().toString()}`);
job.done();
});
Any ideas?
Think I might understand why the async function was not invoked, It is just the name of the queue according to the doc
In my use case, I would subscribe the queue on the app start, then manually publish data to the queue, then based on the cron job defined, it executed the async function
Hi everyone, I am a newbie into using pg-boss. Trying to use this library to schedule a job. I did a simple setup like in README instructed. But I don't see any table is created in the empty pgboss database. Wondering that did I miss anything?
Also when I substituted
with
I don't see any job being scheduled neither subscribed, whereas if using
boss.work()
would triggersomeAsyncJobHandler
, any guidance of what I missed would be really appreciated!