Skip to content

Commit b5004ad

Browse files
authored
Merge pull request #19 from ppavlovic/master
Add Tasker2\Manager::setFetchLimit to change fetch limit per run
2 parents 2162818 + 955652f commit b5004ad

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

src/Tasker2/Manager.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,15 @@ public function run()
5252
->updateStatus();
5353
}
5454

55+
/**
56+
* Set how many tasks to fetch per run
57+
* @param $limit int
58+
*/
59+
public function setFetchLimit($limit)
60+
{
61+
$this->limit = (int) $limit;
62+
}
63+
5564
private function getReservedTasks()
5665
{
5766
$this->tasks = $this->taskRepository->findReserved($this->limit);

0 commit comments

Comments
 (0)