36 lines
1.4 KiB
PHP
36 lines
1.4 KiB
PHP
<?php
|
||
|
||
use App\Services\Monitoring\PackageLimitMetrics;
|
||
use Illuminate\Foundation\Inspiring;
|
||
use Illuminate\Support\Facades\Artisan;
|
||
|
||
Artisan::command('inspire', function () {
|
||
$this->comment(Inspiring::quote());
|
||
})->purpose('Display an inspiring quote');
|
||
|
||
Artisan::command('storage:monitor', function () {
|
||
$this->comment('Storage monitor placeholder – implement metrics collection here.');
|
||
})->purpose('Collect storage capacity statistics for dashboards');
|
||
|
||
Artisan::command('storage:archive-pending', function () {
|
||
$this->comment('Archive dispatcher placeholder – enqueue archive jobs here.');
|
||
})->purpose('Dispatch archive jobs for events ready to move to cold storage');
|
||
|
||
Artisan::command('storage:check-upload-queues', function () {
|
||
$this->comment('Upload queue health placeholder – verify upload pipelines and report issues.');
|
||
})->purpose('Check upload queues for stalled or failed jobs and alert admins');
|
||
|
||
Artisan::command('metrics:package-limits {--reset}', function () {
|
||
$snapshot = PackageLimitMetrics::snapshot();
|
||
|
||
$this->line(json_encode([
|
||
'generated_at' => now()->toIso8601String(),
|
||
'metrics' => $snapshot,
|
||
], JSON_PRETTY_PRINT));
|
||
|
||
if ($this->option('reset')) {
|
||
PackageLimitMetrics::reset();
|
||
$this->comment('Package limit metrics cache was reset.');
|
||
}
|
||
})->purpose('Inspect package limit monitoring counters and optionally reset them');
|