NCVotes / voters-ingestor

Django app to create and configure Postgres DB, then fetch and process public voter registration and voter history files from N.C. Board of Elections
MIT License
10 stars 1 forks source link

Threaded refresh_matviews command, takes an optional --threads=N #66

Closed ironfroggy closed 6 years ago

ironfroggy commented 6 years ago

Answering questions in order:

dpoirier commented 6 years ago

I was thinking we wouldn't schedule the refresh tasks for the children until after the parent was done updating. Do the children need to have an order enforced amongst themselves?

ironfroggy commented 6 years ago

No, you're right there. I was just thinking of them all being on the queue together, but they don't need to be.

We don't have any other celery tasks here yet. Do you want to include it and rewrite this branch before merging it?

dpoirier commented 6 years ago

I'm torn on whether this is worth adding celery to the system. Maybe @vkurup and @philtuska can weigh in?

If we don't switch to celery, I'd like to have some tests for the partitioning function, just so we're confident we're not accidentally missing refreshing any views.

vkurup commented 6 years ago

I do think there's value in adding celery to our deployment (for this, and for the existing cronjobs), but I don't see an absolute need for it to be done prior to this PR, as long as we think it could easily be migrated to celery once it was set up.

dpoirier commented 6 years ago

Getting @philtuskha's input