Removed 'using_custom_file' config option.

This commit is contained in:
Dmitry Khomutov 2017-05-23 23:06:58 +07:00
parent 3a59b66d78
commit 5a761dcddb
No known key found for this signature in database
GPG key ID: 7EB36C9576F9ECB9
2 changed files with 0 additions and 19 deletions

View file

@ -173,10 +173,6 @@ class BuildService
'build_id' => $build->getId(),
];
if ($config->get('using_custom_file')) {
$jobData['config'] = $config->getArray();
}
$pheanstalk = new Pheanstalk($settings['host']);
$pheanstalk->useTube($settings['name']);
$pheanstalk->put(

View file

@ -2,8 +2,6 @@
namespace PHPCensor\Worker;
use b8\Config;
use b8\Database;
use b8\Store\Factory;
use Monolog\Logger;
use Pheanstalk\Job;
@ -95,14 +93,6 @@ class BuildWorker
$this->logger->addInfo('Received build #'.$jobData['build_id'].' from Beanstalkd');
// If the job comes with config data, reset our config and database connections
// and then make sure we kill the worker afterwards:
if (!empty($jobData['config'])) {
$this->logger->addDebug('Using job-specific config.');
$currentConfig = Config::getInstance()->getArray();
Database::reset();
}
try {
$build = BuildFactory::getBuildById($jobData['build_id']);
} catch (\Exception $ex) {
@ -156,11 +146,6 @@ class BuildWorker
// destructor implicitly call flush
unset($buildDbLog);
// Reset the config back to how it was prior to running this job:
if (!empty($currentConfig)) {
Database::reset();
}
// Delete the job when we're done:
if (!empty($job)) {
$this->pheanstalk->delete($job);