refactor(jobs): remove logging for ScheduledJobManager and ServerResourceManager start and completion
This commit is contained in:
@@ -58,10 +58,6 @@ class ScheduledJobManager implements ShouldQueue
|
|||||||
// Freeze the execution time at the start of the job
|
// Freeze the execution time at the start of the job
|
||||||
$this->executionTime = Carbon::now();
|
$this->executionTime = Carbon::now();
|
||||||
|
|
||||||
Log::channel('scheduled')->info('ScheduledJobManager started', [
|
|
||||||
'execution_time' => $this->executionTime->format('Y-m-d H:i:s T'),
|
|
||||||
]);
|
|
||||||
|
|
||||||
// Process backups - don't let failures stop task processing
|
// Process backups - don't let failures stop task processing
|
||||||
try {
|
try {
|
||||||
$this->processScheduledBackups();
|
$this->processScheduledBackups();
|
||||||
@@ -81,8 +77,6 @@ class ScheduledJobManager implements ShouldQueue
|
|||||||
'trace' => $e->getTraceAsString(),
|
'trace' => $e->getTraceAsString(),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
Log::channel('scheduled')->info('ScheduledJobManager completed');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private function processScheduledBackups(): void
|
private function processScheduledBackups(): void
|
||||||
@@ -111,16 +105,6 @@ class ScheduledJobManager implements ShouldQueue
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($this->shouldRunNow($frequency, $serverTimezone)) {
|
if ($this->shouldRunNow($frequency, $serverTimezone)) {
|
||||||
Log::channel('scheduled')->info('Dispatching backup job', [
|
|
||||||
'backup_id' => $backup->id,
|
|
||||||
'backup_name' => $backup->name ?? 'unnamed',
|
|
||||||
'server_name' => $server->name,
|
|
||||||
'frequency' => $frequency,
|
|
||||||
'timezone' => $serverTimezone,
|
|
||||||
'execution_time' => $this->executionTime?->format('Y-m-d H:i:s T'),
|
|
||||||
'current_time' => Carbon::now()->format('Y-m-d H:i:s T'),
|
|
||||||
]);
|
|
||||||
|
|
||||||
DatabaseBackupJob::dispatch($backup);
|
DatabaseBackupJob::dispatch($backup);
|
||||||
}
|
}
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
@@ -157,16 +141,6 @@ class ScheduledJobManager implements ShouldQueue
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($this->shouldRunNow($frequency, $serverTimezone)) {
|
if ($this->shouldRunNow($frequency, $serverTimezone)) {
|
||||||
Log::channel('scheduled')->info('Dispatching task job', [
|
|
||||||
'task_id' => $task->id,
|
|
||||||
'task_name' => $task->name ?? 'unnamed',
|
|
||||||
'server_name' => $server->name,
|
|
||||||
'frequency' => $frequency,
|
|
||||||
'timezone' => $serverTimezone,
|
|
||||||
'execution_time' => $this->executionTime?->format('Y-m-d H:i:s T'),
|
|
||||||
'current_time' => Carbon::now()->format('Y-m-d H:i:s T'),
|
|
||||||
]);
|
|
||||||
|
|
||||||
ScheduledTaskJob::dispatch($task);
|
ScheduledTaskJob::dispatch($task);
|
||||||
}
|
}
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
|
|||||||
@@ -59,10 +59,6 @@ class ServerResourceManager implements ShouldQueue
|
|||||||
$this->instanceTimezone = config('app.timezone');
|
$this->instanceTimezone = config('app.timezone');
|
||||||
}
|
}
|
||||||
|
|
||||||
Log::channel('scheduled')->info('ServerResourceManager started', [
|
|
||||||
'execution_time' => $this->executionTime->format('Y-m-d H:i:s T'),
|
|
||||||
]);
|
|
||||||
|
|
||||||
// Process server checks - don't let failures stop the job
|
// Process server checks - don't let failures stop the job
|
||||||
try {
|
try {
|
||||||
$this->processServerChecks();
|
$this->processServerChecks();
|
||||||
@@ -72,8 +68,6 @@ class ServerResourceManager implements ShouldQueue
|
|||||||
'trace' => $e->getTraceAsString(),
|
'trace' => $e->getTraceAsString(),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
Log::channel('scheduled')->info('ServerResourceManager completed');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private function processServerChecks(): void
|
private function processServerChecks(): void
|
||||||
|
|||||||
Reference in New Issue
Block a user