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
f58c45f7
Commit
f58c45f7
authored
Dec 28, 2017
by
ibuler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Update] 修改run celery
parent
84fa7b5f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
9 deletions
+3
-9
run_server.py
run_server.py
+3
-9
No files found.
run_server.py
View file @
f58c45f7
...
...
@@ -66,15 +66,9 @@ def start_celery():
# Todo: Must set this environment, otherwise not no ansible result return
os
.
environ
.
setdefault
(
'PYTHONOPTIMIZE'
,
'1'
)
if
platform
.
platform
()
.
startswith
(
"Linux"
):
cmd
=
"""
id jumpserver || useradd -s /sbin/nologin jumpserver;
su jumpserver -c 'celery -A common worker -l {}';
"""
.
format
(
LOG_LEVEL
.
lower
())
else
:
cmd
=
"""
export C_FORCE_ROOT=1;celery -A common worker -l {}
"""
.
format
(
LOG_LEVEL
.
lower
())
cmd
=
"""
export C_FORCE_ROOT=1;celery -A common worker -l {}
"""
.
format
(
LOG_LEVEL
.
lower
())
p
=
subprocess
.
Popen
(
cmd
,
shell
=
True
,
stdout
=
sys
.
stdout
,
stderr
=
sys
.
stderr
)
return
p
...
...
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