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
4 changes: 3 additions & 1 deletion dotnet/quickstart/Shared.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,7 @@ public static class Shared
{
// The Task Queue the Worker polls and the client targets. Keep this in sync
// between the Worker and the client.
public const string TaskQueue = "quickstart-standalone-activities";
public static readonly string TaskQueue =
System.Environment.GetEnvironmentVariable("TEMPORAL_TASK_QUEUE")
?? "quickstart-standalone-activities";
}
14 changes: 12 additions & 2 deletions go/quickstart/greet/activity.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,21 @@
// and the client.
package greet

import "context"
import (
"context"
"os"
)

// TaskQueue is the queue the Worker polls and the client submits to. Keep the
// Worker and client pointed at the same value.
const TaskQueue = "quickstart-standalone-activities"
var TaskQueue = taskQueue()

func taskQueue() string {
if v := os.Getenv("TEMPORAL_TASK_QUEUE"); v != "" {
return v
}
return "quickstart-standalone-activities"
}

// Greet is a plain Activity. Nothing here knows or cares whether it was invoked
// as a Standalone Activity or from a Workflow: the same function works either
Expand Down
3 changes: 2 additions & 1 deletion java/quickstart/src/main/java/quickstart/Greeting.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
/** Shared constant: the Task Queue the Worker polls and the client submits to. */
public final class Greeting {
/** Keep the Worker and client pointed at the same value. */
public static final String TASK_QUEUE = "quickstart-standalone-activities";
public static final String TASK_QUEUE =
System.getenv().getOrDefault("TEMPORAL_TASK_QUEUE", "quickstart-standalone-activities");

private Greeting() {}
}
4 changes: 3 additions & 1 deletion python/quickstart/shared.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import os

# The Task Queue the Worker polls and the client targets. Keep this in sync
# between the Worker and the client.
TASK_QUEUE = "quickstart-standalone-activities"
TASK_QUEUE = os.getenv("TEMPORAL_TASK_QUEUE", "quickstart-standalone-activities")
2 changes: 1 addition & 1 deletion ruby/quickstart/shared.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# The Task Queue the Worker polls and the client targets. Keep this in sync
# between the Worker and the client.
TASK_QUEUE = 'quickstart-standalone-activities'.freeze
TASK_QUEUE = (ENV['TEMPORAL_TASK_QUEUE'] || 'quickstart-standalone-activities').freeze
2 changes: 1 addition & 1 deletion typescript/quickstart/src/shared.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
// The Task Queue the Worker polls and the client targets. Keep this in sync
// between the Worker and the client.
export const TASK_QUEUE = 'quickstart-standalone-activities';
export const TASK_QUEUE = process.env.TEMPORAL_TASK_QUEUE || 'quickstart-standalone-activities';
Loading