fix: add /app to sys.path for Celery forked workers importing services.avatar
This commit is contained in:
parent
44e5905bd7
commit
a16559e668
1 changed files with 4 additions and 0 deletions
|
|
@ -2388,7 +2388,11 @@ def fetch_creator_avatar(creator_id: str) -> dict:
|
|||
avatar_url/avatar_source/avatar_fetched_at columns if a confident
|
||||
match is found. Returns a status dict.
|
||||
"""
|
||||
import sys
|
||||
from datetime import datetime, timezone
|
||||
# Ensure /app is on sys.path for forked Celery workers
|
||||
if "/app" not in sys.path:
|
||||
sys.path.insert(0, "/app")
|
||||
from services.avatar import lookup_avatar
|
||||
|
||||
session = _get_sync_session()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue