Skip to content

Latest commit

 

History

History
27 lines (19 loc) · 542 Bytes

README.md

File metadata and controls

27 lines (19 loc) · 542 Bytes

How to use it

  1. Install the repository
pip install git+https://github.com/huridocs/queue-processor
  1. Use it like this:
from queue_processor import QueueProcessor

def process_function(task_message):
    result_message = task_message
    result_message['processed'] = True
    return result_message

queue_processor = QueueProcessor(
    redis_host="localhost", 
    redis_port=6379, 
    queues_names_by_priority=["test_queue_1", "test_queue_2"], 
    logger=service_logger)

queue_processor.start()