localshop
localshop copied to clipboard
Simplify worker modal
We should have three options:
- [ ] Celery
- [ ] Synchronous (just set CELERY_ALWAYS_EAGER=True)
- [ ] Crontab (create management task to update repo)
This will remove the option LOCALSHOP_ISOLATE (which is equal to CELERY_ALWAYS_EAGER afaik)
The package update queue should just be a simple django modal and should be available in the management interface.
Running Localshop with CELERY_ALWAYS_EAGER=True is not really an option. The main problem is that we don't have enough time in a single request to fetch the package metadata from PyPI, download the binaries and return the response to pip.
That may work if the package is small and does not contains many releases, but if the package is big (e.g.: Celery) The request will take too long which will cause pip to timeout and retry the request, causing Localshop to start another slow process in parallel.
Well LOCALSHOP_ISOLATED seems like a custom variant of CELERY_ALWAYS_EAGER. See https://github.com/mvantellingen/localshop/blob/0d320315b7c7a31854abd332cf624ed349771c0e/docs/settings.rst#localshop_isolated