fix(db): remove unused, commented out methods

This commit is contained in:
psychedelicious 2023-10-20 11:41:05 +11:00
parent c071262c20
commit dcd11327c1

View File

@ -100,46 +100,3 @@ class SqliteWorkflowRecordsStorage(WorkflowRecordsStorageBase):
raise
finally:
self._lock.release()
# def update(self, workflow_id: str, workflow: Workflow) -> Workflow:
# """Updates a workflow record."""
# try:
# workflow_id = workflow.get("id", None)
# if type(workflow_id) is not str:
# raise WorkflowNotFoundError(f"Workflow does not have a valid id, got {workflow_id}")
# self._lock.acquire()
# self._cursor.execute(
# """--sql
# UPDATE workflows
# SET workflow = ?
# WHERE workflow_id = ?
# """,
# (workflow, workflow_id),
# )
# self._conn.commit()
# except Exception:
# self._conn.rollback()
# raise
# finally:
# self._lock.release()
# return self.get(workflow_id)
# def delete(self, workflow_id: str) -> Workflow:
# """Updates a workflow record."""
# workflow = self.get(workflow_id)
# try:
# self._lock.acquire()
# self._cursor.execute(
# """--sql
# DELETE FROM workflows
# WHERE workflow_id = ?
# """,
# (workflow_id,),
# )
# self._conn.commit()
# except Exception:
# self._conn.rollback()
# raise
# finally:
# self._lock.release()
# return workflow