diff --git a/listener.py b/listener.py index 8c147c1..149d76d 100644 --- a/listener.py +++ b/listener.py @@ -46,7 +46,7 @@ async def run(): broker = connect_broker() export_actor = dramatiq.actor( - export_block_task, + realtime_export_task, broker=broker, queue_name=HIGH_PRIORITY_QUEUE, priority=HIGH_PRIORITY, diff --git a/worker.py b/worker.py index ce852f0..d7e0e10 100644 --- a/worker.py +++ b/worker.py @@ -11,10 +11,13 @@ from mev_inspect.queue.middleware import ( InspectorMiddleware, ) from mev_inspect.queue.tasks import ( + HIGH_PRIORITY, + HIGH_PRIORITY_QUEUE, LOW_PRIORITY, LOW_PRIORITY_QUEUE, - export_block_task, + backfill_export_task, inspect_many_blocks_task, + realtime_export_task, ) logging.basicConfig(stream=sys.stdout, level=logging.INFO) @@ -28,4 +31,9 @@ dramatiq.set_broker(broker) dramatiq.actor( inspect_many_blocks_task, queue_name=LOW_PRIORITY_QUEUE, priority=LOW_PRIORITY ) -dramatiq.actor(export_block_task) +dramatiq.actor( + backfill_export_task, queue_name=LOW_PRIORITY_QUEUE, priority=HIGH_PRIORITY_QUEUE +) +dramatiq.actor( + realtime_export_task, queue_name=HIGH_PRIORITY_QUEUE, priority=HIGH_PRIORITY +)