Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
J
jumpserver
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ops
jumpserver
Commits
0a74602d
Commit
0a74602d
authored
Nov 13, 2019
by
BaiJiangJie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Update] 修改设置 LDAP 同步任务在任务外部设置running状态
parent
05e7311b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
+2
-0
api.py
apps/settings/api.py
+2
-0
No files found.
apps/settings/api.py
View file @
0a74602d
...
@@ -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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment