"""Background tasks."""

import asyncio
import logging

from saq.types import Context

logger = logging.getLogger(__name__)


async def sample_task(ctx: Context) -> dict:
    """A sample background task.

    Args:
        ctx: The SAQ job context.

    Returns:
        A dictionary with the task result.

    """
    logger.info("Running sample background task")
    await asyncio.sleep(1)
    return {"status": "complete"}
