๐ Django & Celery in production
by
DjangoCon JP 2021 ็บ่กจ่ณๆ
Djangoใง้ๅๆๅฆ็ใๅฎ็พใใใใใซใใใไฝฟใใใฆใใCeleryใใใ Djangoใปใฉ็ฅ่ฆใๅ ฑๆใใใฆใใชใใใใใชใใจใชใไฝฟใฃใฆใใใจใใๆนใๅคใใฎใงใฏใชใใใจๆใใพใใใใฎใใใชๅ ดๅCeleryใไฝฟใใใใใซใใใพใงใฏ้ ่ชฟใงใใๅฎ้ใซ้็จใใฏใใพใฃใใใจใซๅฐใใใจใๅบใฆใใพใใไพใใฐใใญใฐใฎไฟๅญใใชใใฉใคใฎ่จญ่จใใใใญใคๆฆ็ฅใชใฉใ
ใใฎใใผใฏใงใฏใCeleryใDjangoใใญใธใงใฏใใงๅฎ้ใซ้็จใใใใใงใฎๅฝน็ซใคTipsใใไผใใใพใใ
Some good tips about Celery Production tips from Django Congress 2021 in Nagano this year (I couldn't attend). Most of the information is in the docs in English, but it's handy to see it condensed, even if it's in Japanese. A couple key points:
- Use **kwargs for your tasks input. This makes it easier to make updates to your tasks once they're already running in production if your input needs to change.ย
- Reminders about all of the handy kwargs you can pass to tasks in regards to retry. Especially handy autoretry_for where you can pass a tuple of exceptions that will cause the task to automatically retry