timgit / pg-boss

Queueing jobs in Node.js using PostgreSQL like a boss
MIT License
1.73k stars 144 forks source link

Silently rejecting jobs when the db is not connected #438

Open Dam-Buty opened 5 months ago

Dam-Buty commented 5 months ago

Hi,

I have a question that might point to a bug.

Recently i've been using PG-Boss in a set of CLI scripts, but was surprised to see that no jobs were created. It turned out that when writing the CLI wrapper I had made a mistake and forgotten to start() the PG Boss instance.

As a result, db.executeSQL would just fail silently on this line , and the job creation would return null.

Thanks and have a great day :v:

wflanagan commented 4 months ago

I had this problem.. the pooler can make the connection go away, and this is the result.