[go: up one dir, main page]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Silently rejecting jobs when the db is not connected #438

Open
Dam-Buty opened this issue Feb 6, 2024 · 1 comment
Open

Silently rejecting jobs when the db is not connected #438

Dam-Buty opened this issue Feb 6, 2024 · 1 comment

Comments

@Dam-Buty
Copy link
Dam-Buty commented Feb 6, 2024

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.

  • it seems strange that the library would not throw an error in that case. I don't see any scenario where that would be expected behaviour.
  • additionally it is pretty frustrating to receive a null jobId with no indication of what went wrong. Would you consider adding a helper function to investigate what prevents a job from being created ? (be it from singleton, throttling, or in this case an unopened DB handler)

Thanks and have a great day ✌️

@wflanagan
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants