Skip to content

Commit

Permalink
Merge pull request #29 from mvdriel/make-find-limit-during-request-jo…
Browse files Browse the repository at this point in the history
…b-configurable

Make find limit during request job configurable
  • Loading branch information
tersmitten committed Nov 6, 2015
2 parents 5873e1a + 4bd8444 commit b01dd9f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions Console/Command/QueueShell.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ public function initialize() {
// Merge with default configuration vars.
Configure::write('Queue', array_merge(
array(
'workers' => 3,
'sleepTime' => 10,
'gcprop' => 10,
'defaultWorkerTimeout' => 2 * MINUTE,
Expand Down
2 changes: 1 addition & 1 deletion Model/QueuedTask.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public function requestJob($capabilities) {
'age' => 'ASC',
'id' => 'ASC'
);
$limit = 3;
$limit = Configure::read('Queue.workers');

// Generate the job specific conditions.
foreach ($capabilities as $task) {
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ CakePlugin::load('Queue');
Ensure to configure the following lines in `app/Config/bootstrap.php`:

```
Configure::write('Queue.workers', 3);
Configure::write('Queue.sleepTime', 10);
Configure::write('Queue.gcprop', 10);
Configure::write('Queue.defaultWorkerTimeout', 2 * MINUTE);
Expand Down

0 comments on commit b01dd9f

Please sign in to comment.