forge/app/Console/Commands/ResolveVersionsCommand.php
Refringe 16e3a67efd
Query Optimization
- 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.
2024-08-31 01:19:22 -04:00

23 lines
606 B
PHP

<?php
namespace App\Console\Commands;
use App\Jobs\ResolveDependenciesJob;
use App\Jobs\ResolveSptVersionsJob;
use Illuminate\Console\Command;
class ResolveVersionsCommand extends Command
{
protected $signature = 'app:resolve-versions';
protected $description = 'Resolve SPT and dependency versions for all mods';
public function handle(): void
{
ResolveSptVersionsJob::dispatch()->onQueue('default');
ResolveDependenciesJob::dispatch()->onQueue('default');
$this->info('ResolveSptVersionsJob and ResolveDependenciesJob have been added to the queue');
}
}