feat: add single instance locking for tasks with TTL support #224
infection.yml
on: pull_request
infection
/
Mutation Testing
25s
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);
|