Skip to content

Commit 2febb71

Browse files
committed
Update GetBackend calls to include clear option for backend initialization
1 parent 561137c commit 2febb71

File tree

24 files changed

+27
-25
lines changed

24 files changed

+27
-25
lines changed

samples/activity-registration/activity-registration.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import (
2020
func main() {
2121
ctx := context.Background()
2222

23-
b := samples.GetBackend("activity-registration")
23+
b := samples.GetBackend("activity-registration", true)
2424

2525
go RunWorker(ctx, b)
2626

samples/cancellation/cancellation.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ func main() {
2020
ctx := context.Background()
2121
ctx, cancel := context.WithCancel(ctx)
2222

23-
b := samples.GetBackend("cancellation")
23+
b := samples.GetBackend("cancellation", true)
2424

2525
// Run worker
2626
go RunWorker(ctx, b)

samples/complex-parameters/complex-parameters.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import (
1717
func main() {
1818
ctx := context.Background()
1919

20-
b := samples.GetBackend("complex-parameters")
20+
b := samples.GetBackend("complex-parameters", true)
2121

2222
// Run worker
2323
go RunWorker(ctx, b)

samples/concurrent/concurrent.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import (
1818
func main() {
1919
ctx := context.Background()
2020

21-
b := samples.GetBackend("concurrent")
21+
b := samples.GetBackend("concurrent", true)
2222

2323
// Run worker
2424
go RunWorker(ctx, b)

samples/context-propagation/context_propagation.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import (
1616
func main() {
1717
ctx, cancel := context.WithCancel(context.Background())
1818

19-
b := samples.GetBackend("simple", backend.WithContextPropagator(&myPropagator{}))
19+
b := samples.GetBackend("simple", true, backend.WithContextPropagator(&myPropagator{}))
2020

2121
// Run worker
2222
w := RunWorker(ctx, b)

samples/continue-as-new/continue-as-new.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import (
2020
func main() {
2121
ctx, cancel := context.WithCancel(context.Background())
2222

23-
b := samples.GetBackend("continue-as-new")
23+
b := samples.GetBackend("continue-as-new", true)
2424

2525
db, ok := b.(diag.Backend)
2626
if !ok {

samples/converter/converter.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ func (*CustomConverter) To(v interface{}) (payload.Payload, error) {
4141
func main() {
4242
ctx, cancel := context.WithCancel(context.Background())
4343

44-
b := samples.GetBackend("converter", backend.WithConverter(&CustomConverter{}))
44+
b := samples.GetBackend("converter", true, backend.WithConverter(&CustomConverter{}))
4545

4646
// Run worker
4747
w := RunWorker(ctx, b)

samples/errors/errors.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import (
2121
func main() {
2222
ctx := context.Background()
2323

24-
b := samples.GetBackend("errors")
24+
b := samples.GetBackend("errors", true)
2525

2626
db, ok := b.(diag.Backend)
2727
if !ok {

samples/orchestrator/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ func main() {
1818
ctx, cancel := context.WithCancel(context.Background())
1919
defer cancel()
2020

21-
backend := samples.GetBackend("orchestrator", backend.WithWorkerName("orchestrator-worker"))
21+
backend := samples.GetBackend("orchestrator", true, backend.WithWorkerName("orchestrator-worker"))
2222

2323
orchestrator := worker.NewWorkflowOrchestrator(
2424
backend,

samples/queues/queues.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ var (
2727
func main() {
2828
ctx, cancel := context.WithCancel(context.Background())
2929

30-
b := samples.GetBackend("queues", backend.WithLogger(slog.Default()))
30+
b := samples.GetBackend("queues", true, backend.WithLogger(slog.Default()))
3131

3232
db, ok := b.(diag.Backend)
3333
if !ok {

0 commit comments

Comments
 (0)