Skip to content

Commit

Permalink
MongoLRUReader: use update_one instead of find_one_and_update when we…
Browse files Browse the repository at this point in the history
… dont actually use the return value.
  • Loading branch information
cyberw committed Dec 19, 2023
1 parent 6da5bf2 commit 7430cea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion locust_plugins/mongoreader.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def __next__(self) -> dict:
try:
with dblock:
doc: dict = next(self.cursor)
self.coll.find_one_and_update(
self.coll.update_one(
{"_id": doc["_id"]},
{"$set": {self.timestamp_field: datetime.now(tz=timezone.utc)}},
)
Expand Down

0 comments on commit 7430cea

Please sign in to comment.