21 lines
686 B
Python
21 lines
686 B
Python
|
|
"""Scheduled permanent Project CT vTiger archive sync."""
|
||
|
|
|
||
|
|
import logging
|
||
|
|
|
||
|
|
from app.admin.vtiger_archive import run_archive_sync
|
||
|
|
|
||
|
|
logger = logging.getLogger(__name__)
|
||
|
|
|
||
|
|
|
||
|
|
async def run_project_ct_archive_sync() -> None:
|
||
|
|
try:
|
||
|
|
result = await run_archive_sync("incremental")
|
||
|
|
logger.info("Project CT incremental archive sync completed: %s", result)
|
||
|
|
except RuntimeError as exc:
|
||
|
|
if "kører allerede" in str(exc):
|
||
|
|
logger.info("Project CT scheduled sync skipped: %s", exc)
|
||
|
|
return
|
||
|
|
logger.exception("Project CT scheduled archive sync failed")
|
||
|
|
except Exception:
|
||
|
|
logger.exception("Project CT scheduled archive sync failed")
|