import asyncio
from arq import cron
from arq.connections import RedisSettings

redis_settings = RedisSettings.from_dsn("redis://localhost")

async def export_worker(ctx, data: Dict):
    # Simulate export
    print(f"Exporting {data['case_id']}")
    await asyncio.sleep(5)
    return {"status": "COMPLETED"}

# Cron: Run reaper daily
@cron(redis_settings, '0 0 * * *')  # Midnight daily
async def daily_reaper(ctx):
    # Call reaper logic here
    pass