Using starlette 's BackgroundTask and BackgroundTasks from starlette.background , implement a…
Using starlette 's BackgroundTask and BackgroundTasks from starlette.background , implement a…: a task in repo2rlenv-code-instruct (Harbor dataset). PrioritizedTaskQueue must: - Accept tasks via enqueue(priority: int, func, args, kwargs) where lower numbers = higher priority (like a min-heap). -…
The task
`PrioritizedTaskQueue` must: - Accept tasks via `enqueue(priority: int, func, *args, **kwargs)` where **lower numbers = higher priority** (like a min-heap). - Expose a `build_background_tasks()` method that returns a `starlette.background.BackgroundTasks` instance whose internal `.tasks` list is ordered from highest…
Part of FineEnvs/repo2rlenv-code-instruct.