File tree Expand file tree Collapse file tree 1 file changed +10
-8
lines changed
pctasks/core/pctasks/core/cosmos Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -248,14 +248,16 @@ def put(self, model: T) -> None:
248248 )
249249 else :
250250 # Otherwise upsert the item
251- self ._container_client .upsert_item (
252- item ,
253- pre_trigger_include = self .get_trigger (
254- ContainerOperation .PUT , TriggerType .PRE
255- ),
256- post_trigger_include = self .get_trigger (
257- ContainerOperation .PUT , TriggerType .POST
258- ),
251+ with_backoff (
252+ lambda : self ._container_client .upsert_item (
253+ item ,
254+ pre_trigger_include = self .get_trigger (
255+ ContainerOperation .PUT , TriggerType .PRE
256+ ),
257+ post_trigger_include = self .get_trigger (
258+ ContainerOperation .PUT , TriggerType .POST
259+ ),
260+ )
259261 )
260262
261263 def bulk_put (self , models : Iterable [T ]) -> None :
You can’t perform that action at this time.
0 commit comments