Fix task priorities
This commit is contained in:
parent
b86ecbca87
commit
c58d75118d
10
worker.py
10
worker.py
@ -11,7 +11,9 @@ 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,
|
||||
inspect_many_blocks_task,
|
||||
@ -25,5 +27,9 @@ broker.add_middleware(AsyncMiddleware())
|
||||
broker.add_middleware(InspectorMiddleware(os.environ["RPC_URL"]))
|
||||
dramatiq.set_broker(broker)
|
||||
|
||||
dramatiq.actor(inspect_many_blocks_task, queue_name=HIGH_PRIORITY_QUEUE)
|
||||
dramatiq.actor(export_block_task, queue_name=LOW_PRIORITY_QUEUE)
|
||||
dramatiq.actor(
|
||||
inspect_many_blocks_task, queue_name=LOW_PRIORITY_QUEUE, priority=LOW_PRIORITY
|
||||
)
|
||||
dramatiq.actor(
|
||||
export_block_task, queue_name=HIGH_PRIORITY_QUEUE, priority=HIGH_PRIORITY
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user