-
Notifications
You must be signed in to change notification settings - Fork 28
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
Cron jobs not guaranteed to completed in specific order #87
Labels
bug
Something isn't working
Comments
I think the reason it is set up to process in a specific order like that is because Google will only allow sending so many emails at once. So having them all sent at the same time will mean Gmail gets blocked or doesn’t send them at all if there are a lot to send at once. Chris said we should switch away from gmail at some time because of this and security reasons. Now may be the time.
What do you think?
… On Aug 31, 2021, at 4:32 PM, Cameron White ***@***.***> wrote:
Despite needing to execute in a specific order, the cron jobs for HGNRest are not guaranteed to do so.
Jobs are scheduled a few minutes apart under the assumption that job A will be finished by the time job B begins.
Solution: refactor the existing cron jobs into a single job that uses async / await to guarantee jobs finish in the desired order, possibly even more quickly than they currently do.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub <#87>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AEL4LESL45YPZDJ6XRTN42LT7VRBDANCNFSM5DFGAGZQ>.
Triage notifications on the go with GitHub Mobile for iOS <https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> or Android <https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
That's not what I was referring to. The order of the events is fine, but the mechanism that the ordering of the events is based off of isn't guaranteed to work and is more likely to fail as the app gets more users. |
Ok, thank you for the clarification. Just wanted to make sure we’re not changing the way the blue square emails are spread out because that’ll create very bad bug if we do.
… On Sep 1, 2021, at 1:34 PM, Cameron White ***@***.***> wrote:
That's not what I was referring to. The order of the events is fine, but the mechanism that the ordering of the events is based off of isn't guaranteed to work and is more likely to fail as the app gets more users.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub <#87 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AEL4LETFGVO6RMKPDAUWE4LT72E4HANCNFSM5DFGAGZQ>.
Triage notifications on the go with GitHub Mobile for iOS <https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> or Android <https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
If Job A needs to run before B, and B before C, the way the system is currently designed, it doesn't check if A has finished executing before running B -- it just blindly runs. |
Got it. That’d definitely cause the problem we have. Especially since I don’t think the “unpause” people step is scheduled to happen after the send blue squares step… I think it is currently set up as an independent action that runs right at midnight for whatever day they are paused to, and, in the case of Saturday nights, the blue squares all then run 5 minutes later.
… On Sep 1, 2021, at 1:36 PM, Cameron White ***@***.***> wrote:
If Job A needs to run before B, and B before C, the way the system is currently designed, it doesn't check if A has finished executing before running B -- it just blindly runs.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub <#87 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AEL4LEXXHILCSH7BDPLNSYLT72FFHANCNFSM5DFGAGZQ>.
Triage notifications on the go with GitHub Mobile for iOS <https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> or Android <https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Despite needing to execute in a specific order, the cron jobs for HGNRest are not guaranteed to do so.
Jobs are scheduled a few minutes apart under the assumption that job A will be finished by the time job B begins.
Solution: refactor the existing cron jobs into a single job that uses async / await to guarantee jobs finish in the desired order, possibly even more quickly than they currently do.
The text was updated successfully, but these errors were encountered: