Spaces:
Paused
Paused
Download app/controllers/manager/memory_manager.py from CatPtain/MoneyPrinterTurbo: direct link, hf CLI and curl.
- Browser
- Download file 389 Bytes
-
https://huggingface.co/spaces/CatPtain/MoneyPrinterTurbo/resolve/main/app/controllers/manager/memory_manager.py
- Command line
-
hf download hf://spaces/CatPtain/MoneyPrinterTurbo/app/controllers/manager/memory_manager.py
-
curl -L -o memory_manager.py https://huggingface.co/spaces/CatPtain/MoneyPrinterTurbo/resolve/main/app/controllers/manager/memory_manager.py
389 Bytes
| from queue import Queue | |
| from typing import Dict | |
| from app.controllers.manager.base_manager import TaskManager | |
| class InMemoryTaskManager(TaskManager): | |
| def create_queue(self): | |
| return Queue() | |
| def enqueue(self, task: Dict): | |
| self.queue.put(task) | |
| def dequeue(self): | |
| return self.queue.get() | |
| def is_queue_empty(self): | |
| return self.queue.empty() | |