Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement a queue to do asynchronous processing of batches #69

Open
hltcoe-bot opened this issue Aug 7, 2020 · 1 comment
Open

Implement a queue to do asynchronous processing of batches #69

hltcoe-bot opened this issue Aug 7, 2020 · 1 comment

Comments

@hltcoe-bot
Copy link
Collaborator

Right now when a requester uploads a CSV file, the creation of tasks occurs happens while the user waits for the response of the form submission. Right now we have a limit on POST size of 100 MB and that can be a lot of CSV rows. As we scale up, we'll seem more batches with thousands of tasks.

The best way to handle this is to add the CSV parsing and task creation to a queue. This could be a poor man's queue using the database and a cron job or using something like ZeroMQ. For previous projects (non-Django) I've used Celery to abstract away the differences between the different queue systems out there.

Poster: Cash Costello id: 206

@charman
Copy link
Member

charman commented Apr 22, 2021

FWIW, Celery appears to have strong Django support:

Previous versions of Celery required a separate library to work with Django, but since 3.1 this is no longer the case. Django is supported out of the box

https://docs.celeryproject.org/en/latest/django/first-steps-with-django.html

The current Django documentation mentions Celery:

https://docs.djangoproject.com/en/3.2/topics/db/transactions/#performing-actions-after-commit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants