2025-10-16 14:22:46 +02:00
|
|
|
<?php
|
|
|
|
|
|
2025-11-16 22:28:42 +01:00
|
|
|
use App\Jobs\SyncBackendDataPool;
|
2025-10-16 14:22:46 +02:00
|
|
|
use Illuminate\Foundation\Inspiring;
|
|
|
|
|
use Illuminate\Support\Facades\Artisan;
|
2025-11-16 22:28:42 +01:00
|
|
|
use Illuminate\Support\Facades\Log;
|
|
|
|
|
use Illuminate\Support\Facades\Schedule;
|
2025-10-16 14:22:46 +02:00
|
|
|
|
|
|
|
|
Artisan::command('inspire', function () {
|
|
|
|
|
$this->comment(Inspiring::quote());
|
|
|
|
|
})->purpose('Display an inspiring quote');
|
2025-11-16 22:28:42 +01:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Backend Data Pool Sync Scheduling
|
|
|
|
|
*
|
|
|
|
|
* - Incremental Sync: Läuft alle 6 Stunden (nur neue/geänderte Daten)
|
|
|
|
|
* - Full Sync: Läuft jeden Sonntag um 3 Uhr morgens (kompletter Rebuild)
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
// Incremental Sync: Alle 6 Stunden
|
|
|
|
|
Schedule::job(new SyncBackendDataPool(fullSync: false, batchSize: 1000))
|
|
|
|
|
->everySixHours()
|
|
|
|
|
->name('sync-backend-data-pool-incremental')
|
|
|
|
|
->description('Sync new/updated backend transactions to data pool')
|
|
|
|
|
->withoutOverlapping(1800); // Max 30 Minuten Lock (1800 Sekunden)
|
|
|
|
|
|
|
|
|
|
// Full Sync: Jeden Sonntag um 3 Uhr morgens
|
|
|
|
|
Schedule::job(new SyncBackendDataPool(fullSync: true, batchSize: 1000))
|
|
|
|
|
->weeklyOn(0, '03:00') // Sonntag, 3:00 Uhr
|
|
|
|
|
->name('sync-backend-data-pool-full')
|
|
|
|
|
->description('Full sync and rebuild of backend data pool')
|
|
|
|
|
->withoutOverlapping(3600); // Max 1 Stunde Lock (3600 Sekunden)
|