UniqueJobDeclaresUniqueForRule
class UniqueJobDeclaresUniqueForRule implements Rule
Every job implementing ShouldBeUnique must declare how long it stays unique,
with a #[UniqueFor] attribute, a public uniqueFor() method or a public
$uniqueFor property.
Without one, the lock is acquired with a zero duration, whose meaning depends
on the cache store. Normal completion and final failure release the lock, but
a worker that dies mid job can leave it held. Declaring uniqueFor states
that policy explicitly.
Traits
Methods
string
getNodeType()
Get the node type the rule inspects.
array
processNode(Node $node, Scope $scope)
Report a unique job that does not declare how long it stays unique.
Details
at line 42
string
getNodeType()
Get the node type the rule inspects.
at line 53
array
processNode(Node $node, Scope $scope)
Report a unique job that does not declare how long it stays unique.