You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 137db3b
Browse filesBrowse the repository at this point in the historyBrowse files
Let a catalog target run each example on its own Worker
An authoring target can now declare grouping: 'per-example'. The generated
registration then registers one target for each example, with its own task
queue, workflow bundle, and activities. The default, 'shared', keeps the
current output unchanged.
Copy file name to clipboardExpand all lines: src/lib/catalog/README.md
+13Lines changed: 13 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -68,6 +68,19 @@ An API key cannot be combined with any TLS variable. The CA certificate and serv
68
68
69
69
A target is a worker specification: a namespace, a task queue, a workflow bundle, and its activities. The catalog runs **one worker per target**, all in a single process sharing one connection. Starting the worker with two targets registered starts two workers.
70
70
71
+
### Grouping examples into targets
72
+
73
+
An authoring target declares how its examples map to workers with `grouping`:
74
+
75
+
| Grouping | Workers | Task queue | Workflow bundle | Same activity name in two examples |
|`shared` (the default) | One for all examples |`defaultTaskQueue`| The generated workflows module | An error |
78
+
|`per-example`| One for each example |`<defaultTaskQueue>-<example>`| The example's own `workflow.ts`| Allowed |
79
+
80
+
Use `shared` for many small examples that exercise primitives. Use `per-example` when each example must have clear boundaries: its own task queue, bundle, and activities. Both groupings run in the same process. The generated catalog lists each example's task queue, so the browser does not need to know which grouping produced it.
81
+
82
+
A `per-example` target registers targets named `<target id>-<example id>`. Validation fails when a derived target ID or task queue collides with another target. Moving an example to a target with a different grouping changes its task queue.
83
+
71
84
The worker waits for the server rather than exiting if it starts first, printing progress while it retries. Non-connection failures, such as an invalid API key, still fail immediately.
72
85
73
86
On a plaintext local connection, the worker creates any Nexus endpoints its examples declare. When it lacks the authority to do so — any credentialed connection, including Temporal Cloud — it prints the exact `temporal operator nexus endpoint create` command instead, and the catalog page shows the same command as copyable text.
0 commit comments