timgit / pg-boss

Queueing jobs in Postgres from Node.js like a boss
MIT License
2.15k stars 160 forks source link

Silently rejecting jobs when the db is not connected #438

Open Dam-Buty opened 9 months ago

Dam-Buty commented 9 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 8 months ago

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