From ce9eddb3a54e573b495bff53a62a719cf5f9712c Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Jun 01 2017 09:18:54 +0000 Subject: Adjust the runworker utility script as adviced in the review --- diff --git a/runworker.py b/runworker.py index 5aeef4e..a5c5399 100755 --- a/runworker.py +++ b/runworker.py @@ -35,7 +35,8 @@ if args.config: env['PAGURE_CONFIG'] = config cmd = [ - '/usr/bin/celery', 'worker', '-A', 'pagure.lib.tasks', '--autoreload' + sys.executable, '-m', 'celery', 'worker', '-A', 'pagure.lib.tasks', + '--autoreload' ] if args.debug: @@ -45,4 +46,5 @@ elif args.noinfo: else: cmd.append('--loglevel=info') -subprocess.Popen(cmd, env=env or None) +subp = subprocess.Popen(cmd, env=env or None) +subp.wait()