in services/ui_backend_service/api/artifact.py [0:0]
def __init__(self, app, db, cache=None):
self.db = db
self.refiner = ArtifactRefiner(cache=cache.artifact_cache) if cache else None
self._async_table = self.db.artifact_table_postgres
self._async_run_table = self.db.run_table_postgres
app.router.add_route(
"GET",
"/flows/{flow_id}/runs/{run_number}/steps/{step_name}/tasks/{task_id}/artifacts",
self.get_artifacts_by_task,
)
app.router.add_route(
"GET",
"/flows/{flow_id}/runs/{run_number}/steps/{step_name}/artifacts",
self.get_artifacts_by_step,
)
app.router.add_route(
"GET",
"/flows/{flow_id}/runs/{run_number}/artifacts",
self.get_artifacts_by_run,
)