Skip to content

Commit

Permalink
style change
Browse files Browse the repository at this point in the history
  • Loading branch information
stateofkate committed Apr 30, 2024
1 parent 8480899 commit 232443d
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions agentops/worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,11 @@ def __init__(self, config: Configuration) -> None:

def add_event(self, event: dict) -> None:
with self.lock:
found = False # Flag to track if event is found and updated
for existing_event in self.queue:
if existing_event.get('id') == event.get('id'):
existing_event.update(event)
found = True
break
if not found:
else:
self.queue.append(event)
if len(self.queue) >= self.config.max_queue_size:
self.flush_queue()
Expand Down

0 comments on commit 232443d

Please sign in to comment.