timgit / pg-boss

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

sendDebounced is dropping tasks #353

Closed mladen107 closed 1 year ago

mladen107 commented 1 year ago

Basically I have the same issue as described here: https://github.com/timgit/pg-boss/issues/81

I have multiple tasks that I want to execute but only once per minute. If I use sendDebounced multiple times, the first task is started immediately, the second task is scheduled after interval and all other tasks are dropped.

timgit commented 1 year ago

sendDebounced and sendThrottled behave the same, in the sense that at a high level, the goal is throttling a burst of incoming jobs. There are good articles out there describing the differences, but I always prefer debouncing so I know that a job will always run after a burst of activity

mladen107 commented 1 year ago

Yeah I understand. I have set limits to workers to be sure that only one job is executed per interval.