Skip to content

Commit

Permalink
Apply fixes from StyleCI
Browse files Browse the repository at this point in the history
  • Loading branch information
StyleCIBot committed Jan 5, 2024
1 parent 8bb060a commit ab9ca63
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions src/Console/WorkerArgs.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
<?php

/*
* This file is part of blomstra/database-queue
*
* Copyright (c) 2023 Blomstra Ltd.
*
* For the full copyright and license information, please view the LICENSE.md
* file that was distributed with this source code.
*
*/

namespace Blomstra\DatabaseQueue\Console;

use Flarum\Settings\SettingsRepositoryInterface;
Expand All @@ -10,25 +20,24 @@ class WorkerArgs
* @var SettingsRepositoryInterface
*/
protected $settings;

public function __construct(SettingsRepositoryInterface $settings)
{
$this->settings = $settings;
}

public function args(): array
{
$args = [
'--stop-when-empty',
];

$args['--tries'] = $this->settings->get('blomstra-database-queue.retries');
$args['--timeout'] = $this->settings->get('blomstra-database-queue.timeout');
$args['--rest'] = $this->settings->get('blomstra-database-queue.rest');
$args['--memory'] = $this->settings->get('blomstra-database-queue.memory');
$args['--backoff'] = $this->settings->get('blomstra-database-queue.backoff');

return $args;
}

}

0 comments on commit ab9ca63

Please sign in to comment.