Files
pyrodactyl/app/Console/Commands/ProcessTransferQueueCommand.php
2025-11-10 15:38:29 -06:00

31 lines
730 B
PHP

<?php
namespace Pterodactyl\Console\Commands;
use Illuminate\Console\Command;
use Pterodactyl\Services\Servers\TransferQueueService;
class ProcessTransferQueueCommand extends Command
{
protected $signature = 'p:transfer:process-queue';
protected $description = 'Process the server transfer queue and activate waiting transfers';
public function __construct(
private TransferQueueService $transferQueueService,
) {
parent::__construct();
}
public function handle(): int
{
$activated = $this->transferQueueService->processQueue();
if ($activated > 0) {
$this->info("Activated {$activated} transfer(s) from queue.");
}
return 0;
}
}