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

ios - Is 'init' forbidden as *part* of a variable name? -

javascript - Why Selenium can't find an element that is graphically visible -

angular - Angular2 Router: Cannot find primary outlet to load 'HomeComponent' -