Skip to content

Latest commit

 

History

History
25 lines (15 loc) · 813 Bytes

README.md

File metadata and controls

25 lines (15 loc) · 813 Bytes

Build Status Coverage Status Say Thanks

MemoryTaskQueue

A simple Task Queue with a retry mechanism.

Example

from memory_task_queue import MemoryTaskQueue

def my_callback(item):
    print(item)

def my_fallback(item):
    print('Callback failed to run')

mtq = MemoryTaskQueue(my_callback, on_max_retries=my_fallback, delay=0.3, max_retries=3)

mtq.put({'message': 'hello world'})