asynchronous - Django non-blocking save? -


is there's way call save() on model in django, without waiting response db?
consider async, though need less, async calls gives callback- dont need here.
want -

somemodel.objects.bulk_create([list of objects ]) , every 1000 objects,
without line blocking code. have no use in these rows in code.
i'm looking simple, package celery seems offer way more this..

as of 2016, django web framework working (for moment, if ignoring channels) taking http request "as argument" , returns http response possible.

this architecture means there no concept of asynchronous operation in framework. if want delay saving , returns response user without waiting, can:

  • either run thread/async block (which can tedious database transactions...) ;
  • services ironworker allows queue operations run async a.s.a.p ;
  • celery, may bring features case better job homemade solution.

Comments

Popular posts from this blog

sequelize.js - Sequelize group by with association includes id -

android - Robolectric "INTERNET permission is required" -

java - Android raising EPERM (Operation not permitted) when attempting to send UDP packet after network connection -