Update Forking class - remove pdo

This commit is contained in:
DariusIII
2018-10-31 11:06:32 +01:00
parent 36442cad72
commit d857a3e3cc
2 changed files with 3 additions and 13 deletions
+2 -13
View File
@@ -84,11 +84,6 @@ class Forking extends \fork_daemon
*/
private $safeBackfillGroup = '';
/**
* @var
*/
public $pdo;
/**
* @var int
*/
@@ -192,18 +187,12 @@ class Forking extends \fork_daemon
$this->processAdditional = $this->processNFO = $this->processTV = $this->processMovies = $this->ppRenamedOnly = false;
$this->work = [];
// Init Settings here, as forking causes errors when it's destroyed.
$this->pdo = DB::connection()->getPdo();
// Process extra work that should not be forked and done before forking.
$this->processStartWork();
// Get work to fork.
$this->getWork();
// Now we destroy settings, to prevent errors from forking.
unset($this->pdo);
// Process the work we got.
$this->processWork();
@@ -960,9 +949,9 @@ class Forking extends \fork_daemon
{
$sharing = DB::select('SELECT enabled FROM sharing');
if ($sharing > 0 && (int) $sharing[0]->enabled === 1) {
$nntp = new NNTP(['Settings' => $this->pdo]);
$nntp = new NNTP();
if ((int) (Settings::settingValue('..alternate_nntp') === 1 ? $nntp->doConnect(true, true) : $nntp->doConnect()) === true) {
(new PostProcess(['ColorCLI' => $this->_colorCLI]))->processSharing($nntp);
(new PostProcess(['ColorCLI' => $this->colorCli]))->processSharing($nntp);
}
return true;
+1
View File
@@ -1,4 +1,5 @@
2018-10-31 DariusIII
* Chg: Update Forking class - remove pdo
* Chg: Increase group_concat_max_len in groupfixrelnames script
* Chg: Refactor ColorCLI class
* Chg: Update nunomaduro/larastan to version 0.3.7