Skip to content

Commit 723a6db

Browse files
af-mdmaxdml
authored andcommitted
remove extra stepID argument
1 parent 6d3a84a commit 723a6db

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

dbos/dbos.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ type DBOSContext interface {
110110

111111
// Workflow operations
112112
RunAsStep(_ DBOSContext, fn StepFunc, opts ...StepOption) (any, error) // Execute a function as a durable step within a workflow
113-
Go(_ DBOSContext, fn StepFunc, StepID int, opts ...StepOption) (any, error) // Execute a function as a durable step within a Go routine
113+
Go(_ DBOSContext, fn StepFunc, opts ...StepOption) (any, error) // Execute a function as a durable step within a Go routine
114114
RunWorkflow(_ DBOSContext, fn WorkflowFunc, input any, opts ...WorkflowOption) (WorkflowHandle[any], error) // Start a new workflow execution
115115
Send(_ DBOSContext, destinationID string, message any, topic string) error // Send a message to another workflow
116116
Recv(_ DBOSContext, topic string, timeout time.Duration) (any, error) // Receive a message sent to this workflow

dbos/workflow.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1285,11 +1285,10 @@ func Go[R any](ctx DBOSContext, fn Step[R], opts ...StepOption) (R, error) {
12851285
opts = append(opts, WithNextStepID(stepID))
12861286

12871287
// Type-erase the function
1288-
12891288
typeErasedFn := StepFunc(func(ctx context.Context) (any, error) { return fn(ctx) })
12901289

12911290
// run step inside a Go routine by passing stepID
1292-
result, err := ctx.Go(ctx, typeErasedFn, 1, opts...)
1291+
result, err := ctx.Go(ctx, typeErasedFn, opts...)
12931292

12941293
// Step function could return a nil result
12951294
if result == nil {
@@ -1310,7 +1309,7 @@ type stepResultChan struct {
13101309
}
13111310

13121311
// TODO: Add docs --- will add once I get the implementation right
1313-
func (c *dbosContext) Go(ctx DBOSContext, fn StepFunc, stepID int, opts ...StepOption) (any, error) {
1312+
func (c *dbosContext) Go(ctx DBOSContext, fn StepFunc, opts ...StepOption) (any, error) {
13141313
result := make(chan stepResultChan, 1)
13151314
go func() {
13161315
res, err := c.RunAsStep(ctx, fn, opts...)

0 commit comments

Comments
 (0)