fix gitlab tests

This commit is contained in:
root
2026-06-09 02:32:58 -04:00
parent 20a0b6c4e5
commit 6def9993da
1489 changed files with 10449 additions and 11356 deletions
+4 -7
View File
@@ -9,7 +9,6 @@ use Illuminate\Console\Command;
class ConfigUpdateCommand extends Command
{
protected $signature = 'config:update {task?} {--task=} {--dry} {--force} {--tz=}';
protected $description = 'Run a configuration update task (weekly cron).';
public function handle(ConfigUpdateService $service): int
@@ -20,20 +19,18 @@ class ConfigUpdateCommand extends Command
$tzName = (string) ($this->option('tz') ?: (config('School')->attendance['timezone'] ?? 'UTC'));
$tz = new DateTimeZone($tzName);
if ($task === '' || ! in_array($task, $service->availableTasks(), true)) {
$this->error('Invalid or missing --task. Available: '.implode(', ', $service->availableTasks()));
if ($task === '' || !in_array($task, $service->availableTasks(), true)) {
$this->error('Invalid or missing --task. Available: ' . implode(', ', $service->availableTasks()));
return self::FAILURE;
}
$result = $service->runTask($task, $dry, $force, $tz);
if (! $result['ok']) {
if (!$result['ok']) {
$this->error($result['message'] ?? "Task '{$task}' failed.");
return self::FAILURE;
}
$this->info("Task '{$task}' finished successfully.".($dry ? ' [DRY RUN]' : ''));
$this->info("Task '{$task}' finished successfully." . ($dry ? ' [DRY RUN]' : ''));
return self::SUCCESS;
}