Renamed app config worker section to queue + removed max_jobs option (use supervisord)
This commit is contained in:
parent
b5e96aa94c
commit
0ca5c8de51
5 changed files with 15 additions and 46 deletions
|
|
@ -160,9 +160,9 @@ class BuildService
|
|||
}
|
||||
|
||||
$config = Config::getInstance();
|
||||
$settings = $config->get('php-censor.worker', []);
|
||||
$settings = $config->get('php-censor.queue', []);
|
||||
|
||||
if (!empty($settings['host']) && !empty($settings['queue'])) {
|
||||
if (!empty($settings['host']) && !empty($settings['name'])) {
|
||||
try {
|
||||
$jobData = [
|
||||
'type' => 'php-censor.build',
|
||||
|
|
@ -174,12 +174,12 @@ class BuildService
|
|||
}
|
||||
|
||||
$pheanstalk = new Pheanstalk($settings['host']);
|
||||
$pheanstalk->useTube($settings['queue']);
|
||||
$pheanstalk->useTube($settings['name']);
|
||||
$pheanstalk->put(
|
||||
json_encode($jobData),
|
||||
PheanstalkInterface::DEFAULT_PRIORITY,
|
||||
PheanstalkInterface::DEFAULT_DELAY,
|
||||
$config->get('php-censor.worker.job_timeout', 600)
|
||||
$config->get('php-censor.queue.lifetime', 600)
|
||||
);
|
||||
} catch (\Exception $ex) {
|
||||
$this->queueError = true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue