Semaphore Release
semaphore_release · Nodes · Control
Releases a named workflow semaphore slot.
Semaphore Release#
Explicitly releases a semaphore permit held by the current job. Optional - permits are automatically released on job completion.
Overview#
The Semaphore Release node releases a permit that was acquired by SemaphoreAcquire for the same job. This node is optional since permits are automatically released when the job completes, but can be useful for releasing early.
Key Features:
- Releases permit acquired by SemaphoreAcquire for the same job
- Passes through input data unchanged
- Idempotent (safe to call multiple times)
When to Use#
Use Semaphore Release when you need to:
- Release a permit early (before job completes)
- Allow other jobs to proceed while continuing with non-critical work
- Explicitly control the critical section boundary
Configuration#
Fields#
| Field | Type | Required | Description |
|---|---|---|---|
| key_template | String | Yes | Template for semaphore key. Must match the key used in SemaphoreAcquire. Use {{ field }} syntax for interpolation from input. |
Inputs#
| Socket | Type | Required | Description |
|---|---|---|---|
| input | Any | Yes | Input data to pass through. Also used for key template interpolation. |
Outputs#
| Socket | Type | Description |
|---|---|---|
| output | Any | Same value as input (passthrough) |
Example: Early Release#
Release semaphore after critical section, continue with logging:
{
"nodes": [
{
"id": "gate",
"type": "semaphore_acquire",
"config": {
"key_template": "telegram/{{ chat.id }}",
"permits": 1
},
"inputs": {
"input": "{{ trigger }}"
}
},
{
"id": "process",
"type": "ai_agent",
"inputs": {
"input": "{{ gate.output }}"
}
},
{
"id": "release",
"type": "semaphore_release",
"config": {
"key_template": "telegram/{{ chat.id }}"
},
"inputs": {
"input": "{{ gate.output }}"
}
},
{
"id": "log",
"type": "http_get",
"inputs": {
"url": "https://logs.example.com/write"
}
}
]
}
Execution Flow:
- SemaphoreAcquire blocks until permit available
- Process node runs with exclusive access
- SemaphoreRelease releases permit (other jobs can now proceed)
- Log node runs without holding semaphore
Automatic Release#
If you don't use SemaphoreRelease, the permit is automatically released when the job completes. In most cases, you don't need an explicit release node.
Related Nodes#
- semaphore_acquire - Acquire a semaphore permit
Inputs
inputRequired
Outputs
output
Configuration
| Field | Type | Required | Description |
|---|---|---|---|
key_template | text_block | Yes | Semaphore key template. Use {{ field }} for interpolation from input. |
base_config | record | No | Shared node configuration. failure_mode decides what a failure of this node does to the workflow; leave it at the default stop unless the workflow handles the failure itself on the node's error output (route_to_error) or the node is a rare emergency kill switch (stop_workflow). |