Commit f58c45f7 authored by ibuler's avatar ibuler

[Update] 修改run celery

parent 84fa7b5f
......@@ -66,12 +66,6 @@ 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())
......
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