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

Question: Why does Zappa call unschedule/schedule when calling update? #1019

Closed
suriya opened this issue Aug 5, 2021 · 2 comments
Closed

Comments

@suriya
Copy link
Contributor

suriya commented Aug 5, 2021

I see that zappa update invokes self.schedule()

self.schedule()
which in turn invokes self.zappa.schedule_events()
self.zappa.schedule_events(
which calls self.unschedule_events
self.unschedule_events(

It looks like that on every update, Zappa unschedules all event handlers, removes permissions and creates them again.

Could someone explain the reasoning behind this implementation choice?

Specifically, if I comment out the call to schedule() while doing an update, would there be any negative consequence? I prefer to explicitly control events with schedule and unschedule.

@faiyeah
Copy link

faiyeah commented Oct 20, 2021

I guess this is a trick to make sure all periodic scheduled event ( rate xxxxxxx) are run once immediately.

@monkut
Copy link
Collaborator

monkut commented Aug 16, 2023

I believe that currently there no way to detect a change in the schedule, so the schedule is re-created on each deployment.

closing.

@monkut monkut closed this as completed Aug 16, 2023
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

No branches or pull requests

3 participants