#5307 Cannot start worker thread because celery cannot find module
Opened 2 years ago by zpagure. Modified 2 years ago

$ ./runworker.py
Usage: python -m celery [OPTIONS] COMMAND [ARGS]...
Try 'python -m celery --help' for help.

Error: Invalid value for '-A' / '--app': 
Unable to load celery application.
The module worker was not found.

How can I fix this? I really don't understand how to start this worker thread.


Where's runworker.sh coming from?

This file: https://pagure.io/pagure/blob/master/f/runworker.py
It's the worker thread that I think is using celery and redis for processing background tasks (such as cloning a repository).
The instruction are in the README, "Manually" section. It says to run "runworker.py" and "runserver.py"

Oh, sorry. ".py" not ".sh"

Replacing

cmd = [sys.executable, "-m", "celery", "-A", "worker", args.tasks]

with

cmd = [sys.executable, "-m", "celery", "-A", "pagure.lib.tasks", "worker", "--loglevel", "INFO"]

copied from /dev/containers/worker work.
But I don't understand what's going on. Has celery changed command line arguments?

Has celery changed command line arguments?

It has happened in the past yeah, I even remember a change we had to do because
the order of the arguments was invalid between two versions

Login to comment on this ticket.

Metadata