Skip to content

Commit ce1655f

Browse files
committed
fix
1 parent 34acd22 commit ce1655f

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

cozeloop/internal/trace/queue_manager.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -109,22 +109,20 @@ def _drain_queue(self):
109109
self._do_export_batch()
110110

111111
def _do_export(self):
112-
logger.debug(
113-
f"{self.options.queue_name} queue _do_export, len: {len(self.batch)}")
114112
with self.batch_lock:
115113
while not self.queue.empty():
116114
item = self.queue.get()
117115
self.batch.append(item)
118116
if len(self.batch) == self.options.max_export_batch_length:
119117
break
120-
logger.debug(
121-
f"{self.options.queue_name} queue _do_export_end, len: {len(self.batch)}")
122118
self._do_export_batch()
123119

124120
def _do_export_batch(self):
125121
with self.batch_lock:
126122
if self.batch:
127123
if self.export_func:
124+
logger.debug(
125+
f"{self.options.queue_name} queue _do_export, len: {len(self.batch)}")
128126
self.export_func({}, self.batch)
129127
self.batch = []
130128
with self.size_lock:

0 commit comments

Comments
 (0)