mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-12-16 17:12:53 +00:00
Compare commits
3 Commits
v4.10.4-lt
...
v3.10.8
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
65a34aea6e | ||
|
|
913c0d140d | ||
|
|
60d9db7707 |
@@ -8,7 +8,7 @@ __all__ = ['BASE_DIR', 'PROJECT_DIR', 'VERSION', 'CONFIG']
|
|||||||
|
|
||||||
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||||
PROJECT_DIR = os.path.dirname(BASE_DIR)
|
PROJECT_DIR = os.path.dirname(BASE_DIR)
|
||||||
VERSION = '2.0.0'
|
VERSION = 'v3.10.8'
|
||||||
CONFIG = ConfigManager.load_user_config()
|
CONFIG = ConfigManager.load_user_config()
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -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,11 +152,13 @@ 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
|
||||||
try:
|
|
||||||
CeleryTaskExecution.objects.create(**data)
|
with transaction.atomic():
|
||||||
except Exception as e:
|
try:
|
||||||
logger.error(e)
|
CeleryTaskExecution.objects.create(**data)
|
||||||
CeleryTask.objects.filter(name=task).update(date_last_publish=timezone.now())
|
except Exception as e:
|
||||||
|
logger.error('Create celery task execution error: {}'.format(e))
|
||||||
|
CeleryTask.objects.filter(name=task).update(date_last_publish=timezone.now())
|
||||||
|
|
||||||
|
|
||||||
@receiver(django_ready)
|
@receiver(django_ready)
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[tool.poetry]
|
[tool.poetry]
|
||||||
name = "jumpserver"
|
name = "jumpserver"
|
||||||
version = "v3.9"
|
version = "v3.10.8"
|
||||||
description = "广受欢迎的开源堡垒机"
|
description = "广受欢迎的开源堡垒机"
|
||||||
authors = ["ibuler <ibuler@qq.com>"]
|
authors = ["ibuler <ibuler@qq.com>"]
|
||||||
license = "GPLv3"
|
license = "GPLv3"
|
||||||
|
|||||||
Reference in New Issue
Block a user