The Background Task Controller can be implemented using a Redis backend to manage asynchronous tasks. This setup allows you to offload long-running processes and query their status or results later via an API.
To use this, you need a running Redis server and a web server (like uvicorn) to host the application. The workflow involves:
- Creating a task: Sending a request to the server to initiate a background process.
- Querying the task: Using the returned
task_id to check the current status of the task. - Retrieving results: Polling the status until the task is finished to obtain the final output.
# Note: The implementation details are contained in the source file:
# src/redis_background_task_controller/redis_background_task_controller.py