mirror of
https://github.com/Skyvern-AI/skyvern.git
synced 2025-09-16 18:29:40 +00:00
shu/workflowrun timeline get observer cruise id by workflow run id (#1430)
This commit is contained in:
parent
aad741d8de
commit
acbdcb14e3
5 changed files with 117 additions and 4 deletions
|
@ -1067,6 +1067,11 @@ class TextPromptBlock(Block):
|
|||
) -> BlockResult:
|
||||
# get workflow run context
|
||||
workflow_run_context = self.get_workflow_run_context(workflow_run_id)
|
||||
await app.DATABASE.update_workflow_run_block(
|
||||
workflow_run_block_id=workflow_run_block_id,
|
||||
organization_id=organization_id,
|
||||
prompt=self.prompt,
|
||||
)
|
||||
try:
|
||||
self.format_potential_template_parameters(workflow_run_context)
|
||||
except Exception as e:
|
||||
|
@ -1535,6 +1540,14 @@ class SendEmailBlock(Block):
|
|||
self, workflow_run_id: str, workflow_run_block_id: str, organization_id: str | None = None, **kwargs: dict
|
||||
) -> BlockResult:
|
||||
workflow_run_context = self.get_workflow_run_context(workflow_run_id)
|
||||
await app.DATABASE.update_workflow_run_block(
|
||||
workflow_run_block_id=workflow_run_block_id,
|
||||
organization_id=organization_id,
|
||||
recipients=self.recipients,
|
||||
attachments=self.file_attachments,
|
||||
subject=self.subject,
|
||||
body=self.body,
|
||||
)
|
||||
try:
|
||||
self.format_potential_template_parameters(workflow_run_context)
|
||||
except Exception as e:
|
||||
|
@ -1692,6 +1705,11 @@ class WaitBlock(Block):
|
|||
self, workflow_run_id: str, workflow_run_block_id: str, organization_id: str | None = None, **kwargs: dict
|
||||
) -> BlockResult:
|
||||
# TODO: we need to support to interrupt the sleep when the workflow run failed/cancelled/terminated
|
||||
await app.DATABASE.update_workflow_run_block(
|
||||
workflow_run_block_id=workflow_run_block_id,
|
||||
organization_id=organization_id,
|
||||
wait_sec=self.wait_sec,
|
||||
)
|
||||
LOG.info(
|
||||
"Going to pause the workflow for a while",
|
||||
second=self.wait_sec,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue