Django views thread-safety? -



Django views thread-safety? -

i have several view functions process info remote sources. in many cases processing can take on sec complete. simultaneous access these view functions potentially scramble data?

in addition, have continually-running background thread populating database. background thread calling of same library functions view functions calling. potential thread-safety issue?

if yes, best practices? i'm assuming using python's locking mechanism work, there improve approaches?

thanks!

-travis

for long running processes, utilize celery.

for long view, can create model instance, , start celery task populates it. view can show status of instance, self refreshing html until results there.

django thread-safety django-views

Comments

Popular posts from this blog

java - How to pass parameters between Request-Scoped Controllers? -

actionscript 3 - Flex: moving a point with rotation doesnt change the point XY? -

ms access - C# - Using OleDbParameter on table name -