Added sockets for notifications

This commit is contained in:
2026-06-30 21:42:51 +10:00
parent 6cadd3d9e6
commit 6978510147
7 changed files with 62 additions and 17 deletions
@@ -21,20 +21,17 @@ class UpdateDepartedFlights extends Command
{
$now = now()->utc();
$now = now()->utc();
$userFlights = UserFlight::where('departure_date', '<=', $now->toDateTimeString())
->where('departure_date', '>', $now->copy()->subMinute()->toDateTimeString())
->where(function ($query) {
$query->whereNull('departure_processed_at')
->orWhereColumn('departure_processed_at', '<', 'departure_date');
})
->get();
$this->info("Found {$userFlights->count()} flights.");
foreach ($userFlights as $flight) {
$flight->touch();
$flight->update(['departure_processed_at' => $now]);
}
$this->info("Touching flight {$flight->id}");
$result = $flight->touch();
$this->info("Touch result: " . var_export($result, true));
}
}