mirror of
https://github.com/sp-tarkov/forge.git
synced 2025-02-12 20:20:41 -05:00
Refringe
16e3a67efd
- Download counts were taking too long to calculate dynamically, so we're keeping track of a total count with observers and queued job. - Optimized the SQL used to order a mod listing by mod version update times.
21 lines
463 B
PHP
21 lines
463 B
PHP
<?php
|
|
|
|
namespace App\Console\Commands;
|
|
|
|
use App\Jobs\UpdateModDownloadsJob;
|
|
use Illuminate\Console\Command;
|
|
|
|
class UpdateModDownloadsCommand extends Command
|
|
{
|
|
protected $signature = 'app:update-downloads';
|
|
|
|
protected $description = 'Recalculate total downloads for all mods';
|
|
|
|
public function handle(): void
|
|
{
|
|
UpdateModDownloadsJob::dispatch()->onQueue('default');
|
|
|
|
$this->info('UpdateModDownloadsJob added to the queue');
|
|
}
|
|
}
|