Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,11 @@ func main() {
dbos.RegisterWorkflow(ctx, workflow)

// Launch DBOS
err = ctx.Launch()
err = dbos.Launch(ctx)
if err != nil {
panic(err)
}
defer ctx.Shutdown(2 * time.Second)
defer dbos.Shutdown(ctx, 2 * time.Second)

// Run a durable workflow and get its result
handle, err := dbos.RunWorkflow(ctx, workflow, "")
Expand Down Expand Up @@ -157,11 +157,11 @@ func main() {
queue := dbos.NewWorkflowQueue(ctx, "queue")

// Launch DBOS
err = ctx.Launch()
err = dbos.Launch(ctx)
if err != nil {
panic(err)
}
defer ctx.Shutdown(2 * time.Second)
defer dbos.Shutdown(ctx, 2 * time.Second)

// Enqueue tasks and gather results
fmt.Println("Enqueuing workflows")
Expand Down
4 changes: 2 additions & 2 deletions dbos/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@
// AppName: "my-app",
// DatabaseURL: os.Getenv("DBOS_SYSTEM_DATABASE_URL"),
// })
// defer dbosContext.Shutdown(5 * time.Second)
// defer dbos.Shutdown(dbosContext, 5 * time.Second)
//
// // Register workflows before launching
// dbos.RegisterWorkflow(dbosContext, myWorkflow)
//
// // Launch the context to start processing
// err = dbosContext.Launch()
// err = dbos.Launch(dbosContext)
//
// # Workflows
//
Expand Down
Loading