Add separate queue names to consume both then internally prioritize
This commit is contained in:
@@ -11,8 +11,8 @@ from mev_inspect.queue.middleware import (
|
||||
InspectorMiddleware,
|
||||
)
|
||||
from mev_inspect.queue.tasks import (
|
||||
BACKFILL_INSPECT_MANY_BLOCKS_PRIORITY,
|
||||
LIVE_EXPORT_BLOCK_PRIORITY,
|
||||
HIGH_PRIORITY_QUEUE,
|
||||
LOW_PRIORITY_QUEUE,
|
||||
export_block_task,
|
||||
inspect_many_blocks_task,
|
||||
)
|
||||
@@ -25,5 +25,5 @@ broker.add_middleware(AsyncMiddleware())
|
||||
broker.add_middleware(InspectorMiddleware(os.environ["RPC_URL"]))
|
||||
dramatiq.set_broker(broker)
|
||||
|
||||
dramatiq.actor(inspect_many_blocks_task, priority=BACKFILL_INSPECT_MANY_BLOCKS_PRIORITY)
|
||||
dramatiq.actor(export_block_task, priority=LIVE_EXPORT_BLOCK_PRIORITY)
|
||||
dramatiq.actor(inspect_many_blocks_task, queue_name=HIGH_PRIORITY_QUEUE)
|
||||
dramatiq.actor(export_block_task, queue_name=LOW_PRIORITY_QUEUE)
|
||||
|
||||
Reference in New Issue
Block a user