mirror of
https://github.com/HDInnovations/UNIT3D-Community-Edition.git
synced 2026-04-27 14:00:32 -05:00
Revert "fix: redundant fetching of records from the database"
This reverts commit 7d3a9e244e.
This commit is contained in:
@@ -567,7 +567,7 @@ class AnnounceController extends Controller
|
||||
*/
|
||||
private function processAnnounceJob($queries, $user, $group, $torrent): void
|
||||
{
|
||||
ProcessAnnounce::dispatch($queries, serialize($user), serialize($group), serialize($torrent));
|
||||
ProcessAnnounce::dispatch($queries, $user, $group, $torrent);
|
||||
}
|
||||
|
||||
protected function generateFailedAnnounceResponse(TrackerException $trackerException): array
|
||||
|
||||
@@ -15,17 +15,14 @@
|
||||
namespace App\Jobs;
|
||||
|
||||
use App\Models\FreeleechToken;
|
||||
use App\Models\Group;
|
||||
use App\Models\History;
|
||||
use App\Models\Peer;
|
||||
use App\Models\Torrent;
|
||||
use App\Models\User;
|
||||
use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
use Illuminate\Database\Eloquent\Collection;
|
||||
use Illuminate\Foundation\Bus\Dispatchable;
|
||||
use Illuminate\Queue\InteractsWithQueue;
|
||||
use Illuminate\Queue\Middleware\WithoutOverlapping;
|
||||
use Illuminate\Queue\SerializesModels;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Facades\Redis;
|
||||
|
||||
@@ -34,19 +31,13 @@ class ProcessAnnounce implements ShouldQueue
|
||||
use Dispatchable;
|
||||
use InteractsWithQueue;
|
||||
use Queueable;
|
||||
|
||||
private Torrent $torrent;
|
||||
private User $user;
|
||||
private Group $group;
|
||||
use SerializesModels;
|
||||
|
||||
/**
|
||||
* Create a new job instance.
|
||||
*/
|
||||
public function __construct(protected array $queries, string $user, string $group, string $torrent)
|
||||
public function __construct(protected $queries, protected $user, protected $group, protected $torrent)
|
||||
{
|
||||
$this->torrent = unserialize($torrent, ['allowed_classes' => [Torrent::class, Collection::class, Peer::class]]);
|
||||
$this->user = unserialize($user, ['allowed_classes' => [User::class]]);
|
||||
$this->group = unserialize($group, ['allowed_classes' => [Group::class]]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user