Skip to content

Conversation

@thassiov
Copy link
Contributor

@thassiov thassiov commented Apr 29, 2021

Proposed changes (including videos or screenshots)

Reintroduces the old method for creating recurring tasks in the apps' scheduler bridge to ensure tasks won't be duplicated.

By introducing the skipImmediate property option at the scheduleRecurring method, the every method from agenda.js, which ensured no duplicates were created, was removed in favor of a more manual procedure. The new procedure was not taking into account the management of duplicates and as a result multiple copies of the same task could be created and they would get executed at the same time.

In the case of server restarts, every time this event happened and the app had the startupSetting configured to use recurring tasks, they would get recreated the same number of times. In the case of a server that restarts frequently (n times), there would be the same (n) number of tasks duplicated (and running) in the system.

Issue(s)

Steps to test or reproduce

Further comments

@thassiov thassiov requested a review from d-gubert April 29, 2021 20:18
@d-gubert d-gubert changed the title [APPS][FIX] Scheduler duplicating recurrent tasks after server restart [FIX][APPS] Scheduler duplicating recurrent tasks after server restart Apr 29, 2021
@thassiov thassiov merged commit ad8756a into develop Apr 29, 2021
@thassiov thassiov deleted the fix/koko-message-spam-scheduler branch April 29, 2021 21:44
@sampaiodiego sampaiodiego mentioned this pull request May 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants