remove exc_info from LOG.exception (#246)

This commit is contained in:
Shuchang Zheng
2024-04-30 00:27:32 -07:00
committed by GitHub
parent 45d11e5a7f
commit b6a85cf3a5
8 changed files with 20 additions and 22 deletions

View File

@@ -165,10 +165,10 @@ class AgentDB:
await session.refresh(new_artifact)
return convert_to_artifact(new_artifact, self.debug_enabled)
except SQLAlchemyError:
LOG.exception("SQLAlchemyError", exc_info=True)
LOG.exception("SQLAlchemyError")
raise
except Exception:
LOG.exception("UnexpectedError", exc_info=True)
LOG.exception("UnexpectedError")
raise
async def get_task(self, task_id: str, organization_id: str | None = None) -> Task | None:
@@ -580,10 +580,10 @@ class AgentDB:
else:
return None
except SQLAlchemyError:
LOG.exception("SQLAlchemyError", exc_info=True)
LOG.exception("SQLAlchemyError")
raise
except Exception:
LOG.exception("UnexpectedError", exc_info=True)
LOG.exception("UnexpectedError")
raise
async def get_artifact(
@@ -662,10 +662,10 @@ class AgentDB:
return artifacts[0]
return None
except SQLAlchemyError:
LOG.exception("SQLAlchemyError", exc_info=True)
LOG.exception("SQLAlchemyError")
raise
except Exception:
LOG.exception("UnexpectedError", exc_info=True)
LOG.exception("UnexpectedError")
raise
async def get_latest_n_artifacts(
@@ -693,10 +693,10 @@ class AgentDB:
return [convert_to_artifact(artifact, self.debug_enabled) for artifact in artifacts]
return None
except SQLAlchemyError:
LOG.exception("SQLAlchemyError", exc_info=True)
LOG.exception("SQLAlchemyError")
raise
except Exception:
LOG.exception("UnexpectedError", exc_info=True)
LOG.exception("UnexpectedError")
raise
async def get_latest_task_by_workflow_id(