INNER CODE UNIT · Python

sync_inventory_task

doganarif/fastapi-radar · example_app.py:312

def sync_inventory_task():
    """Simulated synchronous background task."""
    import time

    time.sleep(1)
    return "Inventory synchronized"


@track_background_task(radar.get_session)
async def failing_task():
    """Example task that fails."""
    import asyncio

    await asyncio.sleep(0.5)
    raise Exception("Simulated task failure for testing")


@app.post("/send-email")

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…