I need to populate a SQLite database every few minutes in Django, but I want to serve stale data until the data is available for the database to be updated. (i.e. I don't want to block for the data to be gathered; the only time I can block is if there is a lock on the database, during which I have no choice.)
I also don't want to install a separate program or library.
How would I go about setting up another thread that could call save() on a bunch of models, without running into threading issues?
If it was actually simple, you would have done it already.Well, I'm actually new to both Python and Django, so I didn't imagine it to be that difficult; I just thought I don't know how to do it. I'm still not sure which part of it requires the library, though: is it the database lock? Is it the threading itself? Or is it something else that complicates the matter, which I'm forgetting?