timgit / pg-boss

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

Options are not passed correct when scheduling jobs #523

Open janmeier opened 3 days ago

janmeier commented 3 days ago

The documentation mentions that

options supports all properties in send()

So I assume that means I should be able to pass e.g. { retryLimit: 42 }, and have my scheduled jobs retry 42 times.

I'm adding a failing test to showcase the expected behaviour :)

The options are being correct stored in the DB, but it seems they are not being set correctly when the job is queued.

I had a brief look at the code, and I think we need to spread the options here https://github.com/timgit/pg-boss/blob/463f2fc892895b7d0c14e91574c66e4e565b1638/src/timekeeper.js#L147 LMK if that makes sense, then I will update the PR.

tmayr commented 2 days ago

So you think it’s a bug in pgb?