Build functions/ jobs for data_pool and transformation

This commit is contained in:
2025-11-17 15:27:21 +01:00
parent 46820e9515
commit 976af0f2e6
9 changed files with 1417 additions and 26 deletions
+15 -1
View File
@@ -1,9 +1,9 @@
<?php
use App\Jobs\SyncBackendDataPool;
use App\Jobs\TransformDataPoolToProduction;
use Illuminate\Foundation\Inspiring;
use Illuminate\Support\Facades\Artisan;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\Facades\Schedule;
Artisan::command('inspire', function () {
@@ -30,3 +30,17 @@ Schedule::job(new SyncBackendDataPool(fullSync: true, batchSize: 1000))
->name('sync-backend-data-pool-full')
->description('Full sync and rebuild of backend data pool')
->withoutOverlapping(3600); // Max 1 Stunde Lock (3600 Sekunden)
/**
* Data Pool Transformation Scheduling (Stufe 2)
*
* - Läuft 30 Minuten nach jedem Incremental Sync
* - Transformiert Daten aus backend_data_pool companies + transactions
*/
// Transformation: 30 Minuten nach jedem Sync (0:30, 6:30, 12:30, 18:30)
Schedule::job(new TransformDataPoolToProduction(batchSize: 100))
->cron('30 */6 * * *') // :30 jede 6 Stunden
->name('transform-data-pool-to-production')
->description('Transform data pool into companies and transactions')
->withoutOverlapping(1800); // Max 30 Minuten Lock