Skip to content

Commit

Permalink
refactor: Add explicit type hint for tables in temp flow cleanup
Browse files Browse the repository at this point in the history
- Improve type annotations for tables list in cleanup_orphaned_records
- Explicitly define the types of tables to be processed
  • Loading branch information
ogabrielluiz committed Feb 14, 2025
1 parent 160c25a commit 980439b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/backend/base/langflow/services/task/temp_flow_cleanup.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,11 @@ async def cleanup_orphaned_records() -> None:
flow_ids_subquery = select(Flow.id)

# Tables that have flow_id foreign keys
tables = [MessageTable, VertexBuildTable, TransactionTable]
tables: list[type[VertexBuildTable | MessageTable | TransactionTable]] = [
MessageTable,
VertexBuildTable,
TransactionTable,
]

for table in tables:
try:
Expand Down

0 comments on commit 980439b

Please sign in to comment.