While issuing a new build to update code in workers how do I restart celery workers gracefully?
Edit:
What I intend to do is to something like this.
- Worker is running, probably uploading a 100 MB file to S3
- A new build comes
- Worker code has changes
- Build script fires signal to the Worker(s)
- Starts new workers with the new code
- Worker(s) who got the signal after finishing the existing job exit.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…