perpetual: import the jobs helper inside its reconcile step

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
Roland 2026-09-22 16:56:47 -06:00
parent 587bd8d2bf
commit 19ae0e15ac
No known key found for this signature in database
GPG key ID: 1BA620CE6C9A4680

View file

@ -159,7 +159,6 @@ def reconcile_after_predecessor(app) -> dict:
"""
from wrolpi.downloader import download_manager, Download, DownloadStatus
from wrolpi.files.worker import file_worker
from wrolpi.jobs import fail_orphaned_jobs
from wrolpi.db import get_db_session
report = dict(locks=[], jobs=0, downloads=0, processing_domains=0, file_worker_jobs=0)
@ -167,6 +166,7 @@ def reconcile_after_predecessor(app) -> dict:
report['locks'] = heal_shared_locks(app)
try:
from wrolpi.jobs import fail_orphaned_jobs
report['jobs'] = fail_orphaned_jobs()
except Exception as e:
logger.error('reconcile: failed to fail orphaned Jobs', exc_info=e)