#5307 Cannot start worker thread because celery cannot find module
Closed: Fixed by wombelix. Opened by zpagure.

$ ./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

There were other issues open about it and even though I can't find it right now, there was a PR that addressed it which is in master. Closing as fixed.

Metadata Update from @wombelix:
- Issue close_status updated to: Fixed
- Issue status updated to: Closed (was: Open)

Metadata