Skip to content

feat: add immediately option for every repeatable job - #1422

Open
HugoPoi wants to merge 1 commit into
OptimalBits:developfrom
HugoPoi:develop
Open

feat: add immediately option for every repeatable job#1422
HugoPoi wants to merge 1 commit into
OptimalBits:developfrom
HugoPoi:develop

Conversation

@HugoPoi

@HugoPoi HugoPoi commented Aug 10, 2019

Copy link
Copy Markdown

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

coveralls commented Aug 10, 2019

Copy link
Copy Markdown

Coverage Status

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

@Eywek

Eywek commented Nov 7, 2019

Copy link
Copy Markdown

Any news on this?

@HugoPoi

HugoPoi commented Nov 13, 2019

Copy link
Copy Markdown
Author

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

Comment thread lib/repeatable.js Outdated
Comment thread lib/repeatable.js Outdated
@oskarstrasburger

Copy link
Copy Markdown

Any news @manast ?

@faller

faller commented Dec 18, 2019

Copy link
Copy Markdown

Any news?

@manast

manast commented Mar 21, 2020

Copy link
Copy Markdown
Member

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

@HugoPoi

HugoPoi commented Mar 21, 2020

Copy link
Copy Markdown
Author

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

joaozitopolo commented Apr 29, 2020

Copy link
Copy Markdown

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

santiq commented Mar 1, 2021

Copy link
Copy Markdown

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

@HugoPoi

HugoPoi commented Mar 20, 2021

Copy link
Copy Markdown
Author

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

stale Bot commented Jul 12, 2021

Copy link
Copy Markdown

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

manast commented Jul 15, 2021

Copy link
Copy Markdown
Member

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