shu/workflowrun timeline get observer cruise id by workflow run id (#1430)

This commit is contained in:
Shuchang Zheng
2024-12-23 11:48:27 -08:00
committed by GitHub
parent aad741d8de
commit acbdcb14e3
5 changed files with 117 additions and 4 deletions

View File

@@ -504,16 +504,31 @@ class WorkflowRunBlockModel(Base):
output = Column(JSON, nullable=True)
continue_on_failure = Column(Boolean, nullable=False, default=False)
failure_reason = Column(String, nullable=True)
# for loop block
loop_values = Column(JSON, nullable=True)
current_value = Column(String, nullable=True)
current_index = Column(Integer, nullable=True)
# email block
recipients = Column(JSON, nullable=True)
attachments = Column(JSON, nullable=True)
subject = Column(String, nullable=True)
body = Column(String, nullable=True)
# prompt block
prompt = Column(String, nullable=True)
# wait block
wait_sec = Column(Integer, nullable=True)
created_at = Column(DateTime, default=datetime.datetime.utcnow, nullable=False)
modified_at = Column(DateTime, default=datetime.datetime.utcnow, onupdate=datetime.datetime.utcnow, nullable=False)
class ObserverCruiseModel(Base):
__tablename__ = "observer_cruises"
__table_args__ = (Index("oc_org_wfr_index", "organization_id", "workflow_run_id"),)
observer_cruise_id = Column(String, primary_key=True, default=generate_observer_cruise_id)
status = Column(String, nullable=False, default="created")