Initial commit: site monorepo with API, web, and infra.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
"""Background worker: sync reconcile + report jobs."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import logging
|
||||
import time
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
def run_sync_reconcile() -> int:
|
||||
from app.modules.sync.reconcile import run_sync_reconcile as _reconcile
|
||||
|
||||
return _reconcile()
|
||||
|
||||
|
||||
def main() -> None:
|
||||
logging.basicConfig(level=logging.INFO)
|
||||
logger.info("worker started")
|
||||
while True:
|
||||
try:
|
||||
run_sync_reconcile()
|
||||
except Exception:
|
||||
logger.exception("reconcile failed")
|
||||
time.sleep(300)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
Reference in New Issue
Block a user