Skip to content

setting worker config results in worker error #103

@kgk

Description

@kgk

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions