Celery worker

I have a Django app running in a machine and a celery worker in another machine.
The django app uploads files to a folder and I must access this files from the celery task. How can I di this? Can we access files in a machine from another?

Hi… No, those are disjoint filesystems.

Tigris sounds promising for this kind of thing, although I haven’t tried it myself yet.

(Basically, Django would write to that shared object store, instead of creating a file locally.)

Hope this helps a little!


Aside: A worked example of Celery+Tigris might make a nice addition to Fly’s Python blog.

1 Like

Added Django, storage, tigris

I found a workaround for this: I upload the file and save its contents in a BinaryField in the database. Then I call the Celery task that reads this record, gets the field contents, processes it and then deletes the register (as I only need the content and not the file itself).

Thank you very much for the response.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.