api.worker.tasks ================ .. py:module:: api.worker.tasks .. autoapi-nested-parse:: Background jobs that are not registered scripts: they don't need a run history. Attributes ---------- .. autoapisummary:: api.worker.tasks.logger api.worker.tasks.AI_TRANSIENT_ERRORS api.worker.tasks.AUCTIONS_SYNC_LOCK api.worker.tasks.AUCTIONS_SYNC_LOCK_TTL Functions --------- .. autoapisummary:: api.worker.tasks.run_label_ocr api.worker.tasks.run_product_research api.worker.tasks.run_document_search api.worker.tasks.sync_auctions_airtable api.worker.tasks.ultimate3000_offer api.worker.tasks.payroll_monthly_reminder Module Contents --------------- .. py:data:: logger .. py:data:: AI_TRANSIENT_ERRORS .. py:data:: AUCTIONS_SYNC_LOCK :value: 'auctions:airtable:lock' .. py:data:: AUCTIONS_SYNC_LOCK_TTL :value: 1800 .. py:function:: run_label_ocr(self: celery.Task, image_b64: str, content_type: str = 'image/jpeg') -> dict[str, Any] Text of a label photo, and the brand / model / serial number found in it. .. py:function:: run_product_research(self: celery.Task, identity: dict[str, Any]) -> dict[str, Any] AI research on one product, proposed to the sales team (never written to Airtable). .. py:function:: run_document_search(self: celery.Task, identity: dict[str, Any]) -> dict[str, Any] PDF documents of one model found on the web, each checked (a proposal). .. py:function:: sync_auctions_airtable() -> dict[str, Any] | None Copies the auction tracker's followed lots into the auctions Airtable base. .. py:function:: ultimate3000_offer(self: celery.Task, estimation_id: str) -> dict[str, Any] After an UltiMate 3000 offer request: picture, Airtable record, n8n e-mails. .. py:function:: payroll_monthly_reminder() -> dict[str, Any] | None Asks RewakeApp every morning to send the monthly payroll reminder. The app decides the day and sends once a month, so running daily and retrying are safe.