mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-06-28 19:04:19 +00:00
precommit
This commit is contained in:
parent
ca687d3e86
commit
ce040ad111
2 changed files with 16 additions and 4 deletions
|
@ -41,10 +41,7 @@ class MongoDBKVStoreImpl(KVStore):
|
|||
return key
|
||||
return f"{self.config.namespace}:{key}"
|
||||
|
||||
async def set(
|
||||
self, key: str, value: str, expiration: Optional[datetime] = None
|
||||
) -> None:
|
||||
|
||||
async def set(self, key: str, value: str, expiration: Optional[datetime] = None) -> None:
|
||||
key = self._namespaced_key(key)
|
||||
update_query = {"$set": {"value": value, "expiration": expiration}}
|
||||
self.collection.update_one({"key": key}, update_query, upsert=True)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue