File tree Expand file tree Collapse file tree
opentelemetry-sdk/src/opentelemetry/sdk/_shared_internal Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -169,14 +169,21 @@ def worker(self):
169169 self ._worker_awaken .clear ()
170170 self ._export (BatchExportStrategy .EXPORT_ALL )
171171
172- def _export (self , batch_strategy : BatchExportStrategy , flush_should_end : Optional [float ] = None ) -> bool :
172+ def _export (
173+ self ,
174+ batch_strategy : BatchExportStrategy ,
175+ flush_should_end : Optional [float ] = None ,
176+ ) -> bool :
173177 # Returns True if all batches were exported, False if flush_should_end was reached.
174178 with self ._export_lock :
175179 iteration = 0
176180 # We could see concurrent export calls from worker and force_flush. We call _should_export_batch
177181 # once the lock is obtained to see if we still need to make the requested export.
178182 while self ._should_export_batch (batch_strategy , iteration ):
179- if flush_should_end is not None and time .time () >= flush_should_end :
183+ if (
184+ flush_should_end is not None
185+ and time .time () >= flush_should_end
186+ ):
180187 return False
181188 iteration += 1
182189 token = attach (set_value (_SUPPRESS_INSTRUMENTATION_KEY , True ))
You can’t perform that action at this time.
0 commit comments