mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-12-15 16:42:34 +00:00
Compare commits
21 Commits
origin/dev
...
v3.10.8-lt
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
23874460da | ||
|
|
913c0d140d | ||
|
|
60d9db7707 | ||
|
|
f20b9e01ab | ||
|
|
8cf8a3701b | ||
|
|
7ba24293d1 | ||
|
|
f10114c9ed | ||
|
|
cf31cbfb07 | ||
|
|
0edad24d5d | ||
|
|
1f1c1a9157 | ||
|
|
6c9d271ae1 | ||
|
|
6ff852e225 | ||
|
|
baa75dc735 | ||
|
|
8a9f0436b8 | ||
|
|
a9620a3cbe | ||
|
|
769e7dc8a0 | ||
|
|
2a70449411 | ||
|
|
8df720f19e | ||
|
|
dabbb45f6e | ||
|
|
ce24c1c3fd | ||
|
|
3c54c82ce9 |
@@ -134,9 +134,10 @@ def task_sent_handler(headers=None, body=None, **kwargs):
|
|||||||
args, kwargs, __ = body
|
args, kwargs, __ = body
|
||||||
|
|
||||||
try:
|
try:
|
||||||
args = list(args)
|
args = json.loads(json.dumps(list(args), cls=JSONEncoder))
|
||||||
kwargs = json.loads(json.dumps(kwargs, cls=JSONEncoder))
|
kwargs = json.loads(json.dumps(kwargs, cls=JSONEncoder))
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
logger.error('Parse task args or kwargs error (Need handle): {}'.format(e))
|
||||||
args = []
|
args = []
|
||||||
kwargs = {}
|
kwargs = {}
|
||||||
|
|
||||||
@@ -151,10 +152,12 @@ def task_sent_handler(headers=None, body=None, **kwargs):
|
|||||||
request = get_current_request()
|
request = get_current_request()
|
||||||
if request and request.user.is_authenticated:
|
if request and request.user.is_authenticated:
|
||||||
data['creator'] = request.user
|
data['creator'] = request.user
|
||||||
|
|
||||||
|
with transaction.atomic():
|
||||||
try:
|
try:
|
||||||
CeleryTaskExecution.objects.create(**data)
|
CeleryTaskExecution.objects.create(**data)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.error(e)
|
logger.error('Create celery task execution error: {}'.format(e))
|
||||||
CeleryTask.objects.filter(name=task).update(date_last_publish=timezone.now())
|
CeleryTask.objects.filter(name=task).update(date_last_publish=timezone.now())
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user