check body

This commit is contained in:
j 2021-03-19 10:19:19 +01:00
parent 7d8b38e627
commit 7ea1f38a0f

View file

@ -24,7 +24,7 @@ class Worker(ConsumerMixin):
def process_task(self, body, message):
try:
if body['task'] == 'trigger_event':
if isinstance(body, dict) and body.get('task') == 'trigger_event':
daemon.trigger_event(*body['args'])
except:
logger.error('faild to trigger event %s', body, exc_info=True)