Workers effectively restart after each
astro airflow deploy to make sure they’re looking at the most up-to-date code. However, there’s a process in Airflow we call a
worker termination grace period that helps minimize disruption during task execution.
If a deploy is triggered while a celery worker is executing a task, the worker will continue to execute that task before restarting itself up to a certain number of minutes. Our default grace period is currently 10 mins, but that’s actually something you can adjust freely on the Astronomer UI (
Worker Termination Grace Period) - see below for a screenshot.
Note that this is only the case if your deployment is running with a Celery Executor - if you’re running on a local executor, your workers will start immediately upon deployment.
P.S. You might hear this referred to as the “Celery Flush Period.”