Skip to content

Commit

Permalink
Code review and done
Browse files Browse the repository at this point in the history
Signed-off-by: SiqiLuo <1587295470@qq.com>
  • Loading branch information
luosiqi committed Dec 28, 2022
1 parent f6f67fd commit 5f11713
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def run(self):
if status_dict["if_fall"] == "False":
continue
elif status_dict["if_fall"] == "True" and \
self.current_status == "False":
self.current_status == "False":
self.current_status = "True"
samples = os.listdir(self.local_image_url)
samples.sort(reverse=True)
Expand Down
5 changes: 4 additions & 1 deletion lib/sedna/service/server/knowledgeBase/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ class TaskItem(BaseModel): # pylint: disable=too-few-public-methods


class KBServer(BaseServer):
"""
As knowledge base stored in sqlite, this class realized creation,
update and query of sqlite.
"""
def __init__(self, host: str, http_port: int = 8080,
workers: int = 1, save_dir=""):
servername = "knowledgebase"
Expand Down Expand Up @@ -167,7 +171,6 @@ def update(self, task: UploadFile = File(...)):

with Session(bind=engine) as session:
# TODO: to adapt unseen tasks
# for task_group in upload_info["task_groups"]:
for task_group in task_groups:
grp, g_create = get_or_create(
session=session, model=TaskGrp, name=task_group.entry)
Expand Down

0 comments on commit 5f11713

Please sign in to comment.