Skip to content

Commit

Permalink
Mongoreader fix (#168)
Browse files Browse the repository at this point in the history
* Fix a bug in mongoreader preventing using existing collections

* Fix formatting

* More formatting fixes

* Previous fix to using existing collections in MongoLRUReader wasn't working. This should do it.
  • Loading branch information
DennisKrone authored Feb 7, 2024
1 parent 8a3e308 commit cf9a27a
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 @@ -34,7 +34,7 @@ def __init__(
"""
self.timestamp_field = timestamp_field
if not coll:
if coll is None:
self.coll: Collection = MongoClient(env["LOCUST_MONGO"])[env["LOCUST_MONGO_DATABASE"]][
env["LOCUST_MONGO_COLLECTION"]
]
Expand Down

0 comments on commit cf9a27a

Please sign in to comment.