A simple Task Queue with a retry mechanism.
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'})