From 8a51f1c19331b02b1afd5501ccec28ee24135228 Mon Sep 17 00:00:00 2001 From: DariusIII Date: Fri, 5 Apr 2019 19:22:52 +0200 Subject: [PATCH] Revert previous commit --- Blacklight/libraries/Forking.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Blacklight/libraries/Forking.php b/Blacklight/libraries/Forking.php index 870047e23..1332e9fcc 100755 --- a/Blacklight/libraries/Forking.php +++ b/Blacklight/libraries/Forking.php @@ -605,13 +605,13 @@ class Forking private function releases() { - $this->work = UsenetGroup::query()->where('active', '=', 1)->orWhere('backfill', '=', 1)->select(['id', 'name'])->get(); + $this->work = DB::select('SELECT id, name FROM usenet_groups WHERE (active = 1 OR backfill = 1)'); $this->maxProcesses = (int) Settings::settingValue('..releasethreads'); $uGroups = []; foreach ($this->work as $group) { try { - if (! empty(Collection::whereGroupsId($group->id)->select(['id'])->first())) { + if (! empty(DB::select(sprintf('SELECT id FROM collections LIMIT 1')))) { $uGroups[] = ['id' => $group->id, 'name' => $group->name]; } } catch (\PDOException $e) { @@ -621,7 +621,7 @@ class Forking } } - $maxWork = \count($this->work); + $maxWork = \count($uGroups); $pool = Pool::create()->concurrency($this->maxProcesses)->timeout(config('nntmux.multiprocessing_max_child_time'));