fix: avoid holding sessions open (#6769)
This commit is contained in:
committed by
Caren Thomas
parent
c9ad2fd7c4
commit
0634aa13a1
@@ -363,12 +363,10 @@ class StepManager:
|
||||
|
||||
await session.commit()
|
||||
pydantic_step = step.to_pydantic()
|
||||
|
||||
# Send webhook notification for step completion
|
||||
webhook_service = WebhookService()
|
||||
await webhook_service.notify_step_complete(step_id)
|
||||
|
||||
return pydantic_step
|
||||
# Send webhook notification for step completion outside the DB session
|
||||
webhook_service = WebhookService()
|
||||
await webhook_service.notify_step_complete(step_id)
|
||||
return pydantic_step
|
||||
|
||||
@enforce_types
|
||||
@trace_method
|
||||
@@ -416,12 +414,10 @@ class StepManager:
|
||||
|
||||
await session.commit()
|
||||
pydantic_step = step.to_pydantic()
|
||||
|
||||
# Send webhook notification for step completion
|
||||
webhook_service = WebhookService()
|
||||
await webhook_service.notify_step_complete(step_id)
|
||||
|
||||
return pydantic_step
|
||||
# Send webhook notification for step completion outside the DB session
|
||||
webhook_service = WebhookService()
|
||||
await webhook_service.notify_step_complete(step_id)
|
||||
return pydantic_step
|
||||
|
||||
@enforce_types
|
||||
@trace_method
|
||||
@@ -458,12 +454,10 @@ class StepManager:
|
||||
|
||||
await session.commit()
|
||||
pydantic_step = step.to_pydantic()
|
||||
|
||||
# Send webhook notification for step completion
|
||||
webhook_service = WebhookService()
|
||||
await webhook_service.notify_step_complete(step_id)
|
||||
|
||||
return pydantic_step
|
||||
# Send webhook notification for step completion outside the DB session
|
||||
webhook_service = WebhookService()
|
||||
await webhook_service.notify_step_complete(step_id)
|
||||
return pydantic_step
|
||||
|
||||
@enforce_types
|
||||
@trace_method
|
||||
|
||||
Reference in New Issue
Block a user