File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -82,11 +82,11 @@ func main() {
8282 dbos.RegisterWorkflow (ctx, workflow)
8383
8484 // Launch DBOS
85- err = ctx .Launch ()
85+ err = dbos .Launch (ctx )
8686 if err != nil {
8787 panic (err)
8888 }
89- defer ctx .Shutdown (2 * time.Second )
89+ defer dbos .Shutdown (ctx, 2 * time.Second )
9090
9191 // Run a durable workflow and get its result
9292 handle , err := dbos.RunWorkflow (ctx, workflow, " " )
@@ -157,11 +157,11 @@ func main() {
157157 queue := dbos.NewWorkflowQueue (ctx, " queue" )
158158
159159 // Launch DBOS
160- err = ctx .Launch ()
160+ err = dbos .Launch (ctx )
161161 if err != nil {
162162 panic (err)
163163 }
164- defer ctx .Shutdown (2 * time.Second )
164+ defer dbos .Shutdown (ctx, 2 * time.Second )
165165
166166 // Enqueue tasks and gather results
167167 fmt.Println (" Enqueuing workflows" )
Original file line number Diff line number Diff line change 1212// AppName: "my-app",
1313// DatabaseURL: os.Getenv("DBOS_SYSTEM_DATABASE_URL"),
1414// })
15- // defer dbosContext .Shutdown(5 * time.Second)
15+ // defer dbos .Shutdown(dbosContext, 5 * time.Second)
1616//
1717// // Register workflows before launching
1818// dbos.RegisterWorkflow(dbosContext, myWorkflow)
1919//
2020// // Launch the context to start processing
21- // err = dbosContext .Launch()
21+ // err = dbos .Launch(dbosContext )
2222//
2323// # Workflows
2424//
You can’t perform that action at this time.
0 commit comments