[Update] 修改run celery

pull/828/merge
ibuler 2017-12-28 11:39:12 +08:00
parent 84fa7b5f17
commit f58c45f7be
1 changed files with 3 additions and 9 deletions

View File

@ -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())