AustralianSynchrotron / lightflow

A lightweight, distributed workflow system
https://australiansynchrotron.github.io/lightflow/
BSD 3-Clause "New" or "Revised" License
101 stars 18 forks source link

Lightflow not compatible with celery 5 #21

Open andersdd opened 1 year ago

andersdd commented 1 year ago

Following the installation instructions, when I attempt to start a worker lightflow worker start I get the following error:

File "/home/anderson/.local/lib/python3.10/site-packages/lightflow/queue/jobs.py", line 16, in <module>
    @celery.task(bind=True)
  File "/home/anderson/.local/lib/python3.10/site-packages/celery/local.py", line 478, in __getattr__
    return ModuleType.__getattribute__(self, name)
AttributeError: module 'celery' has no attribute 'task'. Did you mean: 'Task'?

I suspect it is because my system (Ubuntu 22.04) is using celery 5.2.7 rather than celery 4 as defined in lightflow's requirements. But I'm not a celery expert so cannot confirm.

jinlong121413 commented 1 year ago

you are right! i meet same issue and swith to celery 4.4.0, then, it works!