Commit 31f5b2c0 authored by ibuler's avatar ibuler

Merge remote-tracking branch 'origin/1.5.5' into 1.5.5

parents 611d5fc1 aebf32d7
...@@ -186,6 +186,8 @@ class LDAPUserListApi(generics.ListAPIView): ...@@ -186,6 +186,8 @@ class LDAPUserListApi(generics.ListAPIView):
sync_util = LDAPSyncUtil() sync_util = LDAPSyncUtil()
# 还没有同步任务 # 还没有同步任务
if sync_util.task_no_start: if sync_util.task_no_start:
# 任务外部设置 task running 状态
sync_util.set_task_status(sync_util.TASK_STATUS_IS_RUNNING)
task = sync_ldap_user_task.delay() task = sync_ldap_user_task.delay()
data = {'msg': 'Cache no data, sync task {} started.'.format(task.id)} data = {'msg': 'Cache no data, sync task {} started.'.format(task.id)}
return Response(data=data, status=409) return Response(data=data, status=409)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment