Update daemons/mailbox.py
This commit is contained in:
parent
784a2ed393
commit
df2a7c3bb1
@ -24,10 +24,7 @@ class Daemon(base.Daemon, queues.TasksHandlerMixin):
|
|||||||
return 'botalka_mailbox'
|
return 'botalka_mailbox'
|
||||||
|
|
||||||
def before_execute(self, task: dict):
|
def before_execute(self, task: dict):
|
||||||
locks.acquire(task['id'])
|
locks.acquire(task['id'], 60)
|
||||||
|
|
||||||
def after_execute(self, task: dict):
|
|
||||||
locks.release(task['id'])
|
|
||||||
|
|
||||||
def process(self, payload: dict):
|
def process(self, payload: dict):
|
||||||
message = Message.model_validate(payload)
|
message = Message.model_validate(payload)
|
||||||
|
Loading…
Reference in New Issue
Block a user