Closed jappeace closed 3 years ago
Good catch @jappeace . Seems to make intuitive sense to me, but want to hear what @ivb-supercede thinks?
@jappeace @ivb-supercede are both of you using odd-jobs
in production?
@saurabhnanda yes, we work for the same company
@ivanbakel @kanagarajkm @tfausak any thoughts on this PR? Will this break anything for you, by any chance?
@ivb-supercede is my work account, so I am OK with these changes.
I don't think this would break anything for me.
@saurabhnanda this looks good. i don't think it will have any impact on our project.
Order jobpollingsql by attempts first so that failed jobs go to end of the queue.
The reason is that failed jobs are likely to fail again. In our case we have some really heavy jobs that consume a lot of resources, interspersed with lighter ones. If one of the heavy job fails, it's better some other job gets a chance to run first. Odd jobs can work on that heavy one again when it's less busy (during night for example).