Commit b6b0d6a9 authored by ibuler's avatar ibuler

[bugfix] Beat start failed, rm pidfile

parent f992347f
......@@ -80,6 +80,8 @@ def start_beat():
os.environ.setdefault('PYTHONOPTIMIZE', '1')
os.environ.setdefault('C_FORCE_ROOT', '1')
pidfile = '/tmp/beat.pid '
if os.path.exists(pidfile):
os.unlink(pidfile)
scheduler = "django_celery_beat.schedulers:DatabaseScheduler"
options = "--pidfile {} -l {} --scheduler {} --max-interval 60".format(
pidfile, LOG_LEVEL, scheduler,
......
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