Skip to content

synchronize()

async Class: JobsAustriaCacheSynchronizer
File: jobs_austria_cache_synchronizer.py ยท line 323

Async loop that processes batches until scrape_cache is clear.

Signature

Parameters none
Returns not annotated
Async Yes
Visibility Public

Implementation

async def synchronize(self):
    """Async loop that processes batches until scrape_cache is clear."""
    logs.info("Starting synchronization...")
    while True:
        has_pending = await asyncio.to_thread(self.run_cycle)
        if not has_pending:
            break
        logs.info(f"Waiting {POLL_INTERVAL}s for next cycle...")
        await asyncio.sleep(POLL_INTERVAL)