Skip to content

Commit 81bef54

Browse files
authored
Merge pull request #204 from fleetbase/feat/schedule-sandbox-sync
feat: schedule sandbox:sync to run hourly
2 parents d3aa933 + 1208f24 commit 81bef54

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

src/Providers/CoreServiceProvider.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,13 @@ public function boot()
165165
$schedule->command('purge:scheduled-task-logs --force --no-interaction --days 1')->twiceDaily(1, 13);
166166
$schedule->command('telemetry:ping')->daily();
167167
$schedule->job(new \Fleetbase\Jobs\MaterializeSchedulesJob())->dailyAt('01:00')->name('materialize-schedules')->withoutOverlapping();
168+
// Keep sandbox users/companies in sync with production so that
169+
// test-mode API key creation (and other sandbox operations) never
170+
// fail due to missing foreign-key referenced rows. Hourly cadence
171+
// is a good balance: frequent enough that new users/companies are
172+
// available in sandbox within an hour of being created in
173+
// production, but infrequent enough to avoid unnecessary DB load.
174+
$schedule->command('sandbox:sync')->hourly()->name('sandbox-sync')->withoutOverlapping();
168175
});
169176
$this->registerObservers();
170177
$this->registerExpansionsFrom();

0 commit comments

Comments
 (0)