Removed 'using_custom_file' config option.
This commit is contained in:
parent
3a59b66d78
commit
5a761dcddb
|
@ -173,10 +173,6 @@ class BuildService
|
||||||
'build_id' => $build->getId(),
|
'build_id' => $build->getId(),
|
||||||
];
|
];
|
||||||
|
|
||||||
if ($config->get('using_custom_file')) {
|
|
||||||
$jobData['config'] = $config->getArray();
|
|
||||||
}
|
|
||||||
|
|
||||||
$pheanstalk = new Pheanstalk($settings['host']);
|
$pheanstalk = new Pheanstalk($settings['host']);
|
||||||
$pheanstalk->useTube($settings['name']);
|
$pheanstalk->useTube($settings['name']);
|
||||||
$pheanstalk->put(
|
$pheanstalk->put(
|
||||||
|
|
|
@ -2,8 +2,6 @@
|
||||||
|
|
||||||
namespace PHPCensor\Worker;
|
namespace PHPCensor\Worker;
|
||||||
|
|
||||||
use b8\Config;
|
|
||||||
use b8\Database;
|
|
||||||
use b8\Store\Factory;
|
use b8\Store\Factory;
|
||||||
use Monolog\Logger;
|
use Monolog\Logger;
|
||||||
use Pheanstalk\Job;
|
use Pheanstalk\Job;
|
||||||
|
@ -95,14 +93,6 @@ class BuildWorker
|
||||||
|
|
||||||
$this->logger->addInfo('Received build #'.$jobData['build_id'].' from Beanstalkd');
|
$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 {
|
try {
|
||||||
$build = BuildFactory::getBuildById($jobData['build_id']);
|
$build = BuildFactory::getBuildById($jobData['build_id']);
|
||||||
} catch (\Exception $ex) {
|
} catch (\Exception $ex) {
|
||||||
|
@ -156,11 +146,6 @@ class BuildWorker
|
||||||
// destructor implicitly call flush
|
// destructor implicitly call flush
|
||||||
unset($buildDbLog);
|
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:
|
// Delete the job when we're done:
|
||||||
if (!empty($job)) {
|
if (!empty($job)) {
|
||||||
$this->pheanstalk->delete($job);
|
$this->pheanstalk->delete($job);
|
||||||
|
|
Loading…
Reference in a new issue