Update app/Console/Kernel.php
This commit is contained in:
parent
76756eb124
commit
83bb75f3be
1 changed files with 16 additions and 13 deletions
|
@ -1,18 +1,18 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace Pterodactyl\Console;
|
namespace App\Console;
|
||||||
|
|
||||||
use Ramsey\Uuid\Uuid;
|
use App\Console\Commands\Egg\CheckEggUpdatesCommand;
|
||||||
use Pterodactyl\Models\ActivityLog;
|
use App\Console\Commands\Maintenance\CleanServiceBackupFilesCommand;
|
||||||
|
use App\Console\Commands\Maintenance\PruneImagesCommand;
|
||||||
|
use App\Console\Commands\Maintenance\PruneOrphanedBackupsCommand;
|
||||||
|
use App\Console\Commands\Schedule\ProcessRunnableCommand;
|
||||||
|
use App\Jobs\NodeStatistics;
|
||||||
|
use App\Models\ActivityLog;
|
||||||
|
use App\Models\Webhook;
|
||||||
use Illuminate\Console\Scheduling\Schedule;
|
use Illuminate\Console\Scheduling\Schedule;
|
||||||
use Illuminate\Database\Console\PruneCommand;
|
use Illuminate\Database\Console\PruneCommand;
|
||||||
use Pterodactyl\Repositories\Eloquent\SettingsRepository;
|
|
||||||
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
|
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
|
||||||
use Pterodactyl\BlueprintFramework\GetExtensionSchedules;
|
|
||||||
use Pterodactyl\Services\Telemetry\TelemetryCollectionService;
|
|
||||||
use Pterodactyl\Console\Commands\Schedule\ProcessRunnableCommand;
|
|
||||||
use Pterodactyl\Console\Commands\Maintenance\PruneOrphanedBackupsCommand;
|
|
||||||
use Pterodactyl\Console\Commands\Maintenance\CleanServiceBackupFilesCommand;
|
|
||||||
|
|
||||||
class Kernel extends ConsoleKernel
|
class Kernel extends ConsoleKernel
|
||||||
{
|
{
|
||||||
|
@ -34,7 +34,12 @@ class Kernel extends ConsoleKernel
|
||||||
|
|
||||||
// Execute scheduled commands for servers every minute, as if there was a normal cron running.
|
// Execute scheduled commands for servers every minute, as if there was a normal cron running.
|
||||||
$schedule->command(ProcessRunnableCommand::class)->everyMinute()->withoutOverlapping();
|
$schedule->command(ProcessRunnableCommand::class)->everyMinute()->withoutOverlapping();
|
||||||
|
|
||||||
$schedule->command(CleanServiceBackupFilesCommand::class)->daily();
|
$schedule->command(CleanServiceBackupFilesCommand::class)->daily();
|
||||||
|
$schedule->command(PruneImagesCommand::class)->daily();
|
||||||
|
$schedule->command(CheckEggUpdatesCommand::class)->hourly();
|
||||||
|
|
||||||
|
$schedule->job(new NodeStatistics())->everyFiveSeconds()->withoutOverlapping();
|
||||||
|
|
||||||
if (config('backups.prune_age')) {
|
if (config('backups.prune_age')) {
|
||||||
// Every 30 minutes, run the backup pruning command so that any abandoned backups can be deleted.
|
// Every 30 minutes, run the backup pruning command so that any abandoned backups can be deleted.
|
||||||
|
@ -45,11 +50,9 @@ class Kernel extends ConsoleKernel
|
||||||
$schedule->command(PruneCommand::class, ['--model' => [ActivityLog::class]])->daily();
|
$schedule->command(PruneCommand::class, ['--model' => [ActivityLog::class]])->daily();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (config('pterodactyl.telemetry.enabled')) {
|
if (config('panel.webhook.prune_days')) {
|
||||||
$this->registerTelemetry($schedule);
|
$schedule->command(PruneCommand::class, ['--model' => [Webhook::class]])->daily();
|
||||||
}
|
}
|
||||||
|
|
||||||
GetExtensionSchedules::schedules($schedule);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue