@@ -101,15 +101,15 @@ type DBOSContext interface {
101101 Shutdown (timeout time.Duration ) // Gracefully shutdown all DBOS runtime components with ordered cleanup sequence
102102
103103 // Workflow operations
104- RunAsStep (_ DBOSContext , fn StepFunc , opts ... StepOption ) (any , error ) // Execute a function as a durable step within a workflow
104+ RunAsStep (_ DBOSContext , fn StepFunc , opts ... StepOption ) (any , error ) // Execute a function as a durable step within a workflow
105105 RunWorkflow (_ DBOSContext , fn WorkflowFunc , input any , opts ... WorkflowOption ) (WorkflowHandle [any ], error ) // Start a new workflow execution
106- Send (_ DBOSContext , destinationID string , message any , topic string ) error // Send a message to another workflow
107- Recv (_ DBOSContext , topic string , timeout time.Duration ) (any , error ) // Receive a message sent to this workflow
108- SetEvent (_ DBOSContext , key string , message any ) error // Set a key-value event for this workflow
109- GetEvent (_ DBOSContext , targetWorkflowID string , key string , timeout time.Duration ) (any , error ) // Get a key-value event from a target workflow
110- Sleep (_ DBOSContext , duration time.Duration ) (time.Duration , error ) // Durable sleep that survives workflow recovery
111- GetWorkflowID () (string , error ) // Get the current workflow ID (only available within workflows)
112- GetStepID () (int , error ) // Get the current step ID (only available within workflows)
106+ Send (_ DBOSContext , destinationID string , message any , topic string ) error // Send a message to another workflow
107+ Recv (_ DBOSContext , topic string , timeout time.Duration ) (any , error ) // Receive a message sent to this workflow
108+ SetEvent (_ DBOSContext , key string , message any ) error // Set a key-value event for this workflow
109+ GetEvent (_ DBOSContext , targetWorkflowID string , key string , timeout time.Duration ) (any , error ) // Get a key-value event from a target workflow
110+ Sleep (_ DBOSContext , duration time.Duration ) (time.Duration , error ) // Durable sleep that survives workflow recovery
111+ GetWorkflowID () (string , error ) // Get the current workflow ID (only available within workflows)
112+ GetStepID () (int , error ) // Get the current step ID (only available within workflows)
113113
114114 // Workflow management
115115 RetrieveWorkflow (_ DBOSContext , workflowID string ) (WorkflowHandle [any ], error ) // Get a handle to an existing workflow
@@ -118,6 +118,7 @@ type DBOSContext interface {
118118 ResumeWorkflow (_ DBOSContext , workflowID string ) (WorkflowHandle [any ], error ) // Resume a cancelled workflow
119119 ForkWorkflow (_ DBOSContext , input ForkWorkflowInput ) (WorkflowHandle [any ], error ) // Fork a workflow from a specific step
120120 ListWorkflows (_ DBOSContext , opts ... ListWorkflowsOption ) ([]WorkflowStatus , error ) // List workflows based on filtering criteria
121+ GetWorkflowSteps (_ DBOSContext , workflowID string ) ([]StepInfo , error ) // Get the execution steps of a workflow
121122
122123 // Accessors
123124 GetApplicationVersion () string // Get the application version for this context
@@ -328,7 +329,6 @@ func NewDBOSContext(inputConfig Config) (DBOSContext, error) {
328329
329330 // Initialize the queue runner and register DBOS internal queue
330331 initExecutor .queueRunner = newQueueRunner (initExecutor .logger )
331- NewWorkflowQueue (initExecutor , _DBOS_INTERNAL_QUEUE_NAME )
332332
333333 // Initialize conductor if API key is provided
334334 if config .ConductorAPIKey != "" {
@@ -383,6 +383,7 @@ func (c *dbosContext) Launch() error {
383383 }
384384
385385 // Start the queue runner in a goroutine
386+ NewWorkflowQueue (c , _DBOS_INTERNAL_QUEUE_NAME )
386387 go func () {
387388 c .queueRunner .run (c )
388389 }()
0 commit comments