fix(tags): move _NORMALIZE_CHUNK_SECONDS above the decorator (syntax error)
The constant + comment landed BETWEEN @celery.task(...) and the function def, which is a syntax error that broke the whole tasks.admin import (cascaded to lint E999 + every backend/integration test). Move it above the decorator. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -75,13 +75,6 @@ def reextract_archive_attachments_task(self) -> dict:
|
||||
)
|
||||
|
||||
|
||||
@celery.task(
|
||||
name="backend.app.tasks.admin.normalize_tags_task",
|
||||
bind=True,
|
||||
autoretry_for=(OperationalError, DBAPIError),
|
||||
retry_backoff=15, retry_backoff_max=180, max_retries=1,
|
||||
soft_time_limit=1800, time_limit=2400, # 30 min / 40 min
|
||||
)
|
||||
# Time-box one chunk well under the soft limit so a large back-catalog (the
|
||||
# first run recases the whole booru vocabulary) can't run the task into the
|
||||
# Celery time limit — it timed out at 40 min, operator-flagged 2026-06-07. The
|
||||
@@ -91,6 +84,13 @@ def reextract_archive_attachments_task(self) -> dict:
|
||||
_NORMALIZE_CHUNK_SECONDS = 600
|
||||
|
||||
|
||||
@celery.task(
|
||||
name="backend.app.tasks.admin.normalize_tags_task",
|
||||
bind=True,
|
||||
autoretry_for=(OperationalError, DBAPIError),
|
||||
retry_backoff=15, retry_backoff_max=180, max_retries=1,
|
||||
soft_time_limit=1800, time_limit=2400, # 30 min / 40 min
|
||||
)
|
||||
def normalize_tags_task(self) -> dict:
|
||||
"""Wraps tag_service.normalize_existing_tags (#714): Title-Case the
|
||||
back-catalog and merge case/whitespace-variant duplicate tags via the
|
||||
|
||||
Reference in New Issue
Block a user