Skip to content

Commit

Permalink
use int instead of float for mongo index
Browse files Browse the repository at this point in the history
  • Loading branch information
johanlundberg committed Feb 1, 2024
1 parent 606dd86 commit b831782
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/auth_server/db/mongo_cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def __init__(
self._db = self._conn[db_name]
self._coll = self._db[collection]
self._coll.create_index("lookup_key", unique=True)
self._coll.create_index("modified_ts", expireAfterSeconds=expire_after.total_seconds())
self._coll.create_index("modified_ts", expireAfterSeconds=int(expire_after.total_seconds()))
if safe_writes:
self._coll = self._coll.with_options(write_concern=WriteConcern(w="majority"))

Expand Down

0 comments on commit b831782

Please sign in to comment.