Skip to content

Commit 62fe970

Browse files
committed
Fix: Update
1 parent 7c0a4b7 commit 62fe970

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

cmd/dbos/migrate.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ func runMigrate(cmd *cobra.Command, args []string) error {
3636
ctx := context.Background()
3737

3838
// Create DBOS context which will run migrations automatically for the system DB
39-
_, err = createDBOSContext(dbURL, ctx)
39+
_, err = createDBOSContext(ctx, dbURL)
4040
if err != nil {
4141
return fmt.Errorf("failed to create DBOS context: %w", err)
4242
}

cmd/dbos/utils.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ func getDBURL(_ *cobra.Command) (string, error) {
7575
}
7676

7777
// createDBOSContext creates a new DBOS context with the provided database URL
78-
func createDBOSContext(dbURL string, userContext context.Context) (dbos.DBOSContext, error) {
78+
func createDBOSContext(userContext context.Context, dbURL string) (dbos.DBOSContext, error) {
7979
appName := "dbos-cli"
8080

8181
ctx, err := dbos.NewDBOSContext(dbos.Config{

cmd/dbos/workflow.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ func runWorkflowList(cmd *cobra.Command, args []string) error {
9393
user_ctx := context.Background()
9494

9595
// Create DBOS context
96-
ctx, err := createDBOSContext(dbURL, user_ctx)
96+
ctx, err := createDBOSContext(user_ctx, dbURL)
9797
if err != nil {
9898
return err
9999
}
@@ -200,7 +200,7 @@ func runWorkflowGet(cmd *cobra.Command, args []string) error {
200200
user_ctx := context.Background()
201201

202202
// Create DBOS context
203-
ctx, err := createDBOSContext(dbURL, user_ctx)
203+
ctx, err := createDBOSContext(user_ctx, dbURL)
204204
if err != nil {
205205
return err
206206
}
@@ -235,7 +235,7 @@ func runWorkflowSteps(cmd *cobra.Command, args []string) error {
235235
user_ctx := context.Background()
236236

237237
// Create DBOS context
238-
ctx, err := createDBOSContext(dbURL, user_ctx)
238+
ctx, err := createDBOSContext(user_ctx, dbURL)
239239
if err != nil {
240240
return err
241241
}
@@ -267,7 +267,7 @@ func runWorkflowCancel(cmd *cobra.Command, args []string) error {
267267
user_ctx := context.Background()
268268

269269
// Create DBOS context
270-
ctx, err := createDBOSContext(dbURL, user_ctx)
270+
ctx, err := createDBOSContext(user_ctx, dbURL)
271271
if err != nil {
272272
return err
273273
}
@@ -293,7 +293,7 @@ func runWorkflowResume(cmd *cobra.Command, args []string) error {
293293
user_ctx := context.Background()
294294

295295
// Create DBOS context
296-
ctx, err := createDBOSContext(dbURL, user_ctx)
296+
ctx, err := createDBOSContext(user_ctx, dbURL)
297297
if err != nil {
298298
return err
299299
}
@@ -326,7 +326,7 @@ func runWorkflowFork(cmd *cobra.Command, args []string) error {
326326
user_ctx := context.Background()
327327

328328
// Create DBOS context
329-
ctx, err := createDBOSContext(dbURL, user_ctx)
329+
ctx, err := createDBOSContext(user_ctx, dbURL)
330330
if err != nil {
331331
return err
332332
}

0 commit comments

Comments
 (0)