mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-09-04 00:44:48 +00:00
fix: 定时任务,再次执行报错
This commit is contained in:
@@ -262,6 +262,8 @@ class CeleryTaskExecutionViewSet(CommonApiMixin, viewsets.ModelViewSet):
|
|||||||
msg = _("Task {} not found").format(execution.name)
|
msg = _("Task {} not found").format(execution.name)
|
||||||
raise JMSException(code='task_not_found_error', detail=msg)
|
raise JMSException(code='task_not_found_error', detail=msg)
|
||||||
try:
|
try:
|
||||||
|
execution.kwargs.pop('__current_lang', None)
|
||||||
|
execution.kwargs.pop('__current_org_id', None)
|
||||||
t = task.delay(*execution.args, **execution.kwargs)
|
t = task.delay(*execution.args, **execution.kwargs)
|
||||||
except TypeError:
|
except TypeError:
|
||||||
msg = _("Task {} args or kwargs error").format(execution.name)
|
msg = _("Task {} args or kwargs error").format(execution.name)
|
||||||
|
Reference in New Issue
Block a user