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

iphone - Dismissing a UIAlertView -

c# - Can ProtoBuf-Net deserialize to a flat class? -

javascript - Change element in each JQuery tab to dynamically generated colors -