op: lock

Acquire a concurrency lock for a key within the current rule scope.

Allowed phases

PhaseStatus
preflight✗ forbidden
core✓ allowed
side_effects✓ allowed

Syntax

- op: lock
  key: item.sku

Parameters

FieldRequiredDescription
keyyesLock key expression (often item.sku inside for_each)

Behavior

  • Pair with unlock in the same scope (typically inside the same for_each iteration).
  • Not allowed in preflight.

unlock · for_each

See also