Add logs to debug waiting bottlenecking

This commit is contained in:
Alan Rominger
2022-07-13 09:39:58 -04:00
parent cfc1255812
commit a3fef27002
6 changed files with 49 additions and 9 deletions

View File

@@ -2,6 +2,7 @@ import inspect
import logging
import sys
import json
import time
from uuid import uuid4
from django.conf import settings
@@ -75,7 +76,7 @@ class task:
msg = f'{cls.name}: Queue value required and may not be None'
logger.error(msg)
raise ValueError(msg)
obj = {'uuid': task_id, 'args': args, 'kwargs': kwargs, 'task': cls.name}
obj = {'uuid': task_id, 'args': args, 'kwargs': kwargs, 'task': cls.name, 'time_pub': time.time()}
guid = get_guid()
if guid:
obj['guid'] = guid