- Notifications
You must be signed in to change notification settings - Fork816
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Pause and Resume implementation wrapper using already exisiting functions#894
base:master
Are you sure you want to change the base?
Conversation
…ions. Just trying to support :). Comments appreciated
AhmadIbrahiim commentedDec 16, 2019
It seems to be perfect if we can addpause andresume to AGENDA! |
|
Could you also add this to documentation (in |
'use strict'; | ||
/** | ||
* Pause a job into the MongoDB | ||
* @name Job# |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Could you change this to@name @name Job#pause
?
/** | ||
* Resumes a job into the MongoDB | ||
* @name Job# |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Could you change this to@name @name Job#resume
?
* @param when time for the new nextRunAt field | ||
* @returns {Promise} instance of Job that is resumed | ||
*/ | ||
module.exports = function(when) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
How would we resume jobs with an interval set? Should we usecomputeFromInterval
?
agenda/lib/job/compute-next-run-at.js
Line 34 inb71d3ea
constcomputeFromInterval=()=>{ |
I'd like to see tests that cover different types of jobs: requrring ones, one-off ones etc. What do you think? |
Proposing we close this as pause/resume implementation is near identical to the existing enable/disable functionality.
From a DX perspective, I often got tripped up with which job methods called |
Couldn't find pause and resume functionality in the existing library. Tried to help using the existing functions. Comments are appreciated.First contribution to Open Source.