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

feat: add immediately option for every repeatable job #1422

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

HugoPoi
Copy link

@HugoPoi HugoPoi commented Aug 10, 2019

Try to resolve #1239

  • immediately not implemented with cron
  • my changes in the createNextJob function are not pretty, maybe add a delete opts.immediately should be better because with the present code it will always be saved in redis ?
  • My unit test doesn't cover lot of cases

@coveralls
Copy link

coveralls commented Aug 10, 2019

Coverage Status

Coverage increased (+0.7%) to 93.777% when pulling ae0e227 on HugoPoi:develop into 01f8154 on OptimalBits:develop.

@Eywek
Copy link

Eywek commented Nov 7, 2019

Any news on this?

@HugoPoi
Copy link
Author

HugoPoi commented Nov 13, 2019

I need someone to review it. And it might be useful to have #1498 with this.

lib/repeatable.js Outdated Show resolved Hide resolved
lib/repeatable.js Outdated Show resolved Hide resolved
@oskarstrasburger
Copy link

Any news @manast ?

@faller
Copy link

faller commented Dec 18, 2019

Any news?

@manast
Copy link
Member

manast commented Mar 21, 2020

I would merge this but my last comment needs to be addressed!

@HugoPoi
Copy link
Author

HugoPoi commented Mar 21, 2020

Ok so I need to refactor, passing the flag directly in opts.immediately because it will need to be handle only at the first iteration and not saved in Redis. And no mutation, so no delete, no assignment with =.

@joaozitopolo
Copy link

joaozitopolo commented Apr 29, 2020

Same problem here. I need to skip the first execution.
If the object "job" on process had a execution count, or a firstRun flag, we can do the skip in the process function.

@santiq
Copy link

santiq commented Mar 1, 2021

@HugoPoi hey man I know it's been a year but could you do those changes? I'll be happy to help.

@HugoPoi
Copy link
Author

HugoPoi commented Mar 20, 2021

I have rebase the change on develop, an immediately flag will be saved in redis is it bad ? I think not.
If we don't want to save the immediately flag in db, need a change to the deepDefault to omit the prop.

@stale
Copy link

stale bot commented Jul 12, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Jul 12, 2021
@manast
Copy link
Member

manast commented Jul 15, 2021

If somebody wants to fix this PR it is just a matter of backporting this PR from BullMQ: taskforcesh/bullmq#536

@stale stale bot removed the wontfix label Jul 15, 2021
@manast manast added the pinned label Jul 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Question] How to run a repeatable job immediate?
8 participants