0
0
mirror of https://github.com/PostHog/posthog.git synced 2024-12-01 12:21:02 +01:00

chore(plugin-server): Restart async migration if status.FAILED (#11297)

This is happening on cloud as a result of autoscaling killing pods with
sigterm
This commit is contained in:
Karl-Aksel Puulmann 2022-08-15 16:24:26 +03:00 committed by GitHub
parent 2a7aa4e7cd
commit 6bf71eece7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -44,7 +44,7 @@ def check_async_migration_health() -> None:
# failures and successes are handled elsewhere
# pending means we haven't picked up the task yet
# retry is not possible as max_retries == 0
if migration_task_celery_state not in (states.STARTED, states.PENDING):
if migration_task_celery_state not in (states.STARTED, states.PENDING, states.FAILURE):
return
inspector = app.control.inspect()