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

Fix: Ensure cleared nextRunAt when saving to db #1477

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

Commits on Aug 14, 2022

  1. Fix: Ensure cleared nextRunAt when saving to db

    When using a mongodb client configured with the option `ignoreUndefined`
    set to `true`, trying to clear the property `nextRunAt` from a job
    scheduled using `schedule` method by setting it to `undefined` does not
    take effect as it is ignored.
    
    After computing `nextRunAt` property before running the job (`run.ts`), the
    change in value is not persisted, making it always behind `lastRunAt`
    after the first executing. This makes the program run the processor
    very quickly and indefinitely, exhausting the CPU's capacity.
    
    Setting the property to `null` at the beginning of the computation makes
    sure the value is properly cleared.
    thassiov committed Aug 14, 2022
    Configuration menu
    Copy the full SHA
    7985270 View commit details
    Browse the repository at this point in the history