async def async_map_worker(
        items, 
        func, 
        semaphore,
        max_retries=3, 
        initial_backoff=1.0, 
        backoff_factor=2.0, 
        jitter=0.1,
        timeout=None,
        on_success=None,
        on_failure=None,
        logger=None
    ):
        """Map an async function over items with concurrency control."""
        async def bounded_process(item):
            async with semaphore:
                return await process_with_retry(
                    func, 
                    item, 
                    max_retries, 
                    initial_backoff, 
                    backoff_factor, 
                    jitter,
                    timeout,
                    on_success,
                    on_failure,
                    logger
                )

        # Create tasks
        tasks = [bounded_process(item) for item in items]
        return tasks
Map an async function over items with concurrency control.
app.py