inventree / InvenTree

Open Source Inventory Management System
https://docs.inventree.org
MIT License
4.12k stars 734 forks source link

[Roadmap] background worker process #4304

Closed SchrodingersGat closed 1 year ago

SchrodingersGat commented 1 year ago

We have been using django-q for ages, but the project has not received any updates in a few years.

There are also some shortcomings - in particular the tasks seem to run on multiple workers - see https://github.com/inventree/InvenTree/issues/4290

Perhaps it is time to migrate to something like celery:

I have not yet done the required reading to determine how difficult this might be, or if it would require using redis, etc.

matmair commented 1 year ago

@SchrodingersGat the thing I like about django q is that it does not need a broker to run. To my knowledge, we will need redis to use celery. Thus making testing and small bare metal setups harder.

SchrodingersGat commented 1 year ago

Indeed. I do like the simplicity of the current solution. Before switching I'd like to understand if there is a way around the current issues. The biggest one being the double execution of tasks

SchrodingersGat commented 1 year ago

Ref: https://github.com/Koed00/django-q/issues/633 Ref: https://github.com/Koed00/django-q/issues/577 Ref: https://github.com/Koed00/django-q/issues/566

matmair commented 1 year ago

@SchrodingersGat can we close this now as #5167 is merged

SchrodingersGat commented 1 year ago

Yes, I think we can. Sticking with django-q is more attractive now that we've found an active fork