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
f3d2e5d1
Unverified
Commit
f3d2e5d1
authored
Nov 13, 2019
by
BaiJiangJie
Committed by
GitHub
Nov 13, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3434 from jumpserver/dev_ldap
[Update] 修改设置 LDAP 同步任务在任务外部设置running状态
parents
aa428b02
6bfb026e
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 @
f3d2e5d1
...
...
@@ -186,6 +186,8 @@ class LDAPUserListApi(generics.ListAPIView):
sync_util
=
LDAPSyncUtil
()
# 还没有同步任务
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
()
data
=
{
'msg'
:
'Cache no data, sync task {} started.'
.
format
(
task
.
id
)}
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