Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

setting worker config results in worker error #103

Open
kgk opened this issue Mar 19, 2024 · 0 comments · May be fixed by #104
Open

setting worker config results in worker error #103

kgk opened this issue Mar 19, 2024 · 0 comments · May be fixed by #104

Comments

@kgk
Copy link

kgk commented Mar 19, 2024

Setting integer properties results in the worker failing to start.. we could default to use_celeryconfig but would prefer
to keep the config in the ini file.

[celery]
...
worker_max_tasks_per_child=1024

on worker start :

"levelname": "CRITICAL", "name": "celery.worker", "message": "Unrecoverable error: AssertionError()", "exc_info": "Traceback (most recent call last):
  File \"/opt/viqi/lib/python3.10/site-packages/celery/worker/worker.py\", line 202, in start
    self.blueprint.start(self)
  File \"/opt/viqi/lib/python3.10/site-packages/celery/bootsteps.py\", line 116, in start
    step.start(parent)
  File \"/opt/viqi/lib/python3.10/site-packages/celery/bootsteps.py\", line 365, in start
    return self.obj.start()
  File \"/opt/viqi/lib/python3.10/site-packages/celery/concurrency/base.py\", line 130, in start
    self.on_start()
  File \"/opt/viqi/lib/python3.10/site-packages/celery/concurrency/prefork.py\", line 109, in on_start
    P = self._pool = Pool(processes=self.limit,
  File \"/opt/viqi/lib/python3.10/site-packages/celery/concurrency/asynpool.py\", line 464, in __init__
    super().__init__(processes, *args, **kwargs)
  File \"/opt/viqi/lib/python3.10/site-packages/billiard/pool.py\", line 1045, in __init__
    self._create_worker_process(i)
  File \"/opt/viqi/lib/python3.10/site-packages/celery/concurrency/asynpool.py\", line 482, in _create_worker_process
    return super()._create_worker_process(i)
  File \"/opt/viqi/lib/python3.10/site-packages/billiard/pool.py\", line 1142, in _create_worker_process
    w = self.WorkerProcess(self.Worker(
  File \"/opt/viqi/lib/python3.10/site-packages/billiard/pool.py\", line 241, in __init__
    assert maxtasks is None or (type(maxtasks) == int and maxtasks > 0)
AssertionError",

It appears all fields are loaded as str from config section

@kgk kgk linked a pull request Mar 21, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant