mpt2026 / app /controllers /manager /memory_manager.py
chaowenguo's picture
Upload 108 files
e58b6a6 verified
raw
history blame contribute delete
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()