Skip to content

feat: add single instance locking for tasks with TTL support #224

feat: add single instance locking for tasks with TTL support

feat: add single instance locking for tasks with TTL support #224

Triggered via pull request April 18, 2025 06:18
Status Success
Total duration 56s
Artifacts

infection.yml

on: pull_request
infection  /  Mutation Testing
25s
infection / Mutation Testing
Fit to window
Zoom out
Zoom in

Annotations

5 warnings
infection / Mutation Testing: src/Task.php#L138
Escaped Mutant for Mutator "UnwrapUcFirst": @@ @@ cache()->save($lockKey, [], $this->singleInstanceTTL ?? 0); } try { - $method = 'run' . ucfirst($this->type); + $method = 'run' . $this->type; if (!method_exists($this, $method)) { throw TasksException::forInvalidTaskType($this->type); }
infection / Mutation Testing: src/Task.php#L134
Escaped Mutant for Mutator "MethodCallRemoval": @@ @@ { if ($this->singleInstance) { $lockKey = $this->getLockKey(); - cache()->save($lockKey, [], $this->singleInstanceTTL ?? 0); + } try { $method = 'run' . ucfirst($this->type);
infection / Mutation Testing: src/Task.php#L134
Escaped Mutant for Mutator "Coalesce": @@ @@ { if ($this->singleInstance) { $lockKey = $this->getLockKey(); - cache()->save($lockKey, [], $this->singleInstanceTTL ?? 0); + cache()->save($lockKey, [], 0 ?? $this->singleInstanceTTL); } try { $method = 'run' . ucfirst($this->type);
infection / Mutation Testing: src/Task.php#L134
Escaped Mutant for Mutator "DecrementInteger": @@ @@ { if ($this->singleInstance) { $lockKey = $this->getLockKey(); - cache()->save($lockKey, [], $this->singleInstanceTTL ?? 0); + cache()->save($lockKey, [], $this->singleInstanceTTL ?? -1); } try { $method = 'run' . ucfirst($this->type);
infection / Mutation Testing: src/Task.php#L134
Escaped Mutant for Mutator "IncrementInteger": @@ @@ { if ($this->singleInstance) { $lockKey = $this->getLockKey(); - cache()->save($lockKey, [], $this->singleInstanceTTL ?? 0); + cache()->save($lockKey, [], $this->singleInstanceTTL ?? 1); } try { $method = 'run' . ucfirst($this->type);