diff --git a/apps/extras/management/commands/celerydaemon.py b/apps/extras/management/commands/celerydaemon.py index a66ba9753b..bd5109014e 100644 --- a/apps/extras/management/commands/celerydaemon.py +++ b/apps/extras/management/commands/celerydaemon.py @@ -3,7 +3,7 @@ from optparse import make_option from django.core.management.base import BaseCommand import daemon -import lockfile +import daemon.pidlockfile from celery.bin.celeryd import run_worker, OPTION_LIST @@ -20,7 +20,7 @@ class Command(BaseCommand): def handle(self, *args, **opts): pidfile = None if opts['pidfile']: - pidfile = lockfile.FileLock(opts['pidfile']) + pidfile = daemon.pidlockfile.PIDLockFile(opts['pidfile']) del opts['pidfile'] with daemon.DaemonContext(pidfile=pidfile):