Open AndreasMilants opened 4 years ago
Hi Andreas, Thanks for the merge request. I've started reading it - it opens up new possibilities for Photologue, and for making processing more generic. I'd like to make this change as clean and as robust as possible, so I've made a lot of comments on your code. Please view them as constructive comments rather than as criticism. I look forward to reading your modified code.
Just made a new commit based on your comments. All current tests pass (python 3.8)
Hi, Thanks for the updated code - I have added my comments above. I have a thought: it will be really useful add in the documentation instructions on how to use this new feature.
This PR adds celery support.
Getting a response after uploading a zip-file is way quicker. -> Less server time-outs
This is how the upload works when celery is used:
It can be used by setting PHOTOLOGUE_USE_CELERY = True. By default, when using celery, the zip-file is saved on the local disk, since it doesn't need to be there for long and we want quick access. This location can be changed by setting PHOTOLOGUE_TEMP_ZIP_STORAGE = SomeStorage().
67 tests from the master fail on my computer, and after this commit, the same tests fail. It's probably best if you run the tests yourself.
I'm currently using a similar version of this in my own testing environment where I duplicated the code, and so far haven't found any issues.
Should I write tests for the celery update? This means that celery should be installed when running tests in the future. (To be honest I have no clue how to write tests for celery, but I can look it up)