Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 0 additions & 18 deletions api/db.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,14 +94,6 @@ async def del_kv(self, namespace, key):
keyname = ":".join([namespace, key])
return await self._redis.delete(keyname)

async def exists_kv(self, namespace, key):
"""
Check if key exists in redis key-value store
Create a keyname by concatenating namespace and key
"""
keyname = ":".join([namespace, key])
return await self._redis.exists(keyname)

async def create_indexes(self):
"""Create indexes for models"""
for model in self.COLLECTIONS:
Expand All @@ -122,16 +114,6 @@ async def find_one(self, model, **kwargs):
obj = await col.find_one(kwargs)
return model(**obj) if obj else None

async def find_one_by_attributes(self, model, attributes):
"""Find one object with matching attributes without pagination

The attributes dictionary provides key/value pairs used to find an
object with matching attributes.
"""
col = self._get_collection(model)
obj = await col.find_one(attributes)
return model(**obj) if obj else None

async def find_by_id(self, model, obj_id):
"""Find one object with a given id"""
col = self._get_collection(model)
Expand Down
2 changes: 1 addition & 1 deletion kube/aks/api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ spec:
valueFrom:
secretKeyRef:
name: kernelci-api-secret
key: unified-secret
key: unified_secret
optional: true
- name: EMAIL_SENDER
valueFrom:
Expand Down