Skip to content

Commit c54b9e7

Browse files
authored
update readme (#163)
1 parent 75cdba9 commit c54b9e7

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff 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")

dbos/doc.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@
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
//

0 commit comments

Comments
 (0)