feat: add queue task type to scheduler #226
infection.yml
on: pull_request
infection
/
Mutation Testing
32s
Annotations
6 warnings
|
infection / Mutation Testing:
src/Test/MockTask.php#L49
Escaped Mutant for Mutator "TrueValue":
@@ @@
throw TasksException::forInvalidTaskType($this->type);
}
$_SESSION['tasks_cache'] = [$this->type, $this->action];
- return ['command' => 'success', 'shell' => [], 'closure' => 42, 'event' => true, 'url' => 'body', 'queue' => true][$this->type];
+ return ['command' => 'success', 'shell' => [], 'closure' => 42, 'event' => true, 'url' => 'body', 'queue' => false][$this->type];
}
}
|
|
infection / Mutation Testing:
src/Task.php#L314
Escaped Mutant for Mutator "ArrayItem":
@@ @@
$queueAction = $this->getAction();
if ($this->singleInstance) {
// Create PayloadMetadata instance with the task lock key
- $queueAction[] = new PayloadMetadata(['queue' => $queueAction[0], 'taskLockTTL' => $this->singleInstanceTTL, 'taskLockKey' => $this->getLockKey()]);
+ $queueAction[] = new PayloadMetadata(['queue' => $queueAction[0], 'taskLockTTL' => $this->singleInstanceTTL, 'taskLockKey' > $this->getLockKey()]);
}
return service('queue')->push(...$queueAction);
}
|
|
infection / Mutation Testing:
src/Task.php#L313
Escaped Mutant for Mutator "ArrayItem":
@@ @@
$queueAction = $this->getAction();
if ($this->singleInstance) {
// Create PayloadMetadata instance with the task lock key
- $queueAction[] = new PayloadMetadata(['queue' => $queueAction[0], 'taskLockTTL' => $this->singleInstanceTTL, 'taskLockKey' => $this->getLockKey()]);
+ $queueAction[] = new PayloadMetadata(['queue' => $queueAction[0], 'taskLockTTL' > $this->singleInstanceTTL, 'taskLockKey' => $this->getLockKey()]);
}
return service('queue')->push(...$queueAction);
}
|
|
infection / Mutation Testing:
src/Task.php#L312
Escaped Mutant for Mutator "IncrementInteger":
@@ @@
$queueAction = $this->getAction();
if ($this->singleInstance) {
// Create PayloadMetadata instance with the task lock key
- $queueAction[] = new PayloadMetadata(['queue' => $queueAction[0], 'taskLockTTL' => $this->singleInstanceTTL, 'taskLockKey' => $this->getLockKey()]);
+ $queueAction[] = new PayloadMetadata(['queue' => $queueAction[1], 'taskLockTTL' => $this->singleInstanceTTL, 'taskLockKey' => $this->getLockKey()]);
}
return service('queue')->push(...$queueAction);
}
|
|
infection / Mutation Testing:
src/Task.php#L311
Escaped Mutant for Mutator "ArrayItemRemoval":
@@ @@
$queueAction = $this->getAction();
if ($this->singleInstance) {
// Create PayloadMetadata instance with the task lock key
- $queueAction[] = new PayloadMetadata(['queue' => $queueAction[0], 'taskLockTTL' => $this->singleInstanceTTL, 'taskLockKey' => $this->getLockKey()]);
+ $queueAction[] = new PayloadMetadata(['taskLockTTL' => $this->singleInstanceTTL, 'taskLockKey' => $this->getLockKey()]);
}
return service('queue')->push(...$queueAction);
}
|
|
infection / Mutation Testing:
src/Task.php#L305
Escaped Mutant for Mutator "ProtectedVisibility":
@@ @@
/**
* Sends a job to the queue.
*/
- protected function runQueue()
+ private function runQueue()
{
$queueAction = $this->getAction();
if ($this->singleInstance) {
|