pip install simpleq
python
from simpleq import SimpleQ
python
queue = SimpleQ('my_queue')
python
def process_task(task):
pass
queue.add(process_task)
python
queue.start()
python
tasks_count = queue.size()
python
from simpleq import SimpleQ
def process_task(task):
print(f"Processing task: {task}")
queue = SimpleQ('my_queue')
queue.add(process_task)
tasks_count = queue.size()
print(f"Tasks in queue: {tasks_count}")
queue.start()