@@ -1408,13 +1408,11 @@ func (c *dbosContext) RetrieveWorkflow(_ DBOSContext, workflowID string) (Workfl
14081408 })
14091409 }, WithStepName ("DBOS.retrieveWorkflow" ))
14101410 } else {
1411- workflowStatus , err = retryWithResult (c , func () ([]WorkflowStatus , error ) {
1412- return c .systemDB .listWorkflows (c , listWorkflowsDBInput {
1413- workflowIDs : []string {workflowID },
1414- loadInput : loadInput ,
1415- loadOutput : loadOutput ,
1416- })
1417- }, withRetrierLogger (c .logger ))
1411+ workflowStatus , err = c .systemDB .listWorkflows (c , listWorkflowsDBInput {
1412+ workflowIDs : []string {workflowID },
1413+ loadInput : loadInput ,
1414+ loadOutput : loadOutput ,
1415+ })
14181416 }
14191417 if err != nil {
14201418 return nil , fmt .Errorf ("failed to retrieve workflow status: %w" , err )
@@ -1471,9 +1469,7 @@ func (c *dbosContext) CancelWorkflow(_ DBOSContext, workflowID string) error {
14711469 }, WithStepName ("DBOS.cancelWorkflow" ))
14721470 return err
14731471 } else {
1474- return retry (c , func () error {
1475- return c .systemDB .cancelWorkflow (c , workflowID )
1476- }, withRetrierLogger (c .logger ))
1472+ return c .systemDB .cancelWorkflow (c , workflowID )
14771473 }
14781474}
14791475
@@ -1509,9 +1505,7 @@ func (c *dbosContext) ResumeWorkflow(_ DBOSContext, workflowID string) (Workflow
15091505 return nil , err
15101506 }, WithStepName ("DBOS.resumeWorkflow" ))
15111507 } else {
1512- err = retry (c , func () error {
1513- return c .systemDB .resumeWorkflow (c , workflowID )
1514- }, withRetrierLogger (c .logger ))
1508+ err = c .systemDB .resumeWorkflow (c , workflowID )
15151509 }
15161510 if err != nil {
15171511 return nil , err
@@ -1591,9 +1585,7 @@ func (c *dbosContext) ForkWorkflow(_ DBOSContext, input ForkWorkflowInput) (Work
15911585 return c .systemDB .forkWorkflow (ctx , dbInput )
15921586 }, WithStepName ("DBOS.forkWorkflow" ))
15931587 } else {
1594- forkedWorkflowID , err = retryWithResult (c , func () (string , error ) {
1595- return c .systemDB .forkWorkflow (c , dbInput )
1596- }, withRetrierLogger (c .logger ))
1588+ forkedWorkflowID , err = c .systemDB .forkWorkflow (c , dbInput )
15971589 }
15981590 if err != nil {
15991591 return nil , err
@@ -1832,22 +1824,13 @@ func (c *dbosContext) ListWorkflows(_ DBOSContext, opts ...ListWorkflowsOption)
18321824 // Call the context method to list workflows
18331825 workflowState , ok := c .Value (workflowStateKey ).(* workflowState )
18341826 isWithinWorkflow := ok && workflowState != nil
1835- var workflows []WorkflowStatus
1836- var err error
18371827 if isWithinWorkflow {
1838- workflows , err = RunAsStep (c , func (ctx context.Context ) ([]WorkflowStatus , error ) {
1828+ return RunAsStep (c , func (ctx context.Context ) ([]WorkflowStatus , error ) {
18391829 return c .systemDB .listWorkflows (ctx , dbInput )
18401830 }, WithStepName ("DBOS.listWorkflows" ))
18411831 } else {
1842- workflows , err = retryWithResult (c , func () ([]WorkflowStatus , error ) {
1843- return c .systemDB .listWorkflows (c , dbInput )
1844- }, withRetrierLogger (c .logger ))
1832+ return c .systemDB .listWorkflows (c , dbInput )
18451833 }
1846- if err != nil {
1847- return nil , err
1848- }
1849-
1850- return workflows , nil
18511834}
18521835
18531836// ListWorkflows retrieves a list of workflows based on the provided filters.
@@ -1909,9 +1892,7 @@ func (c *dbosContext) GetWorkflowSteps(_ DBOSContext, workflowID string) ([]Step
19091892 return c .systemDB .getWorkflowSteps (ctx , workflowID )
19101893 }, WithStepName ("DBOS.getWorkflowSteps" ))
19111894 } else {
1912- return retryWithResult (c , func () ([]StepInfo , error ) {
1913- return c .systemDB .getWorkflowSteps (c , workflowID )
1914- }, withRetrierLogger (c .logger ))
1895+ return c .systemDB .getWorkflowSteps (c , workflowID )
19151896 }
19161897}
19171898
0 commit comments