Fixed arrival processing
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
namespace App\Console\Commands;
|
||||
|
||||
use App\Models\User;
|
||||
use Illuminate\Console\Attributes\Description;
|
||||
use Illuminate\Console\Attributes\Signature;
|
||||
use Illuminate\Console\Command;
|
||||
|
||||
#[Signature('app:recalculate-achivements')]
|
||||
#[Description('Recalculate achievements for all users')]
|
||||
class RecalculateAchivements extends Command
|
||||
{
|
||||
/**
|
||||
* Execute the console command.
|
||||
*/
|
||||
public function handle(): void
|
||||
{
|
||||
$users = User::all();
|
||||
foreach ($users as $user) {
|
||||
$user->calculateAchievements();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -13,7 +13,7 @@ use Illuminate\Database\Eloquent\Collection;
|
||||
#[Description('Looks for any changes to Alliance membership and updates automatically')]
|
||||
class UpdateAlliances extends Command
|
||||
{
|
||||
public function handle()
|
||||
public function handle(): void
|
||||
{
|
||||
$day = now('UTC')->startOfMinute()->toDateString();
|
||||
|
||||
|
||||
Generated
+82
-1
@@ -4,7 +4,7 @@
|
||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "7aff03daebe0ac56c75c3db31ba87ded",
|
||||
"content-hash": "eb16a3b778bbeaad9a49b64820d911ba",
|
||||
"packages": [
|
||||
{
|
||||
"name": "brick/math",
|
||||
@@ -4475,6 +4475,87 @@
|
||||
],
|
||||
"time": "2024-06-11T12:45:25+00:00"
|
||||
},
|
||||
{
|
||||
"name": "simplepie/simplepie",
|
||||
"version": "1.9.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/simplepie/simplepie.git",
|
||||
"reference": "76cccb1b2c5dcaf44f304c925ab30c0f48643992"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/simplepie/simplepie/zipball/76cccb1b2c5dcaf44f304c925ab30c0f48643992",
|
||||
"reference": "76cccb1b2c5dcaf44f304c925ab30c0f48643992",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-pcre": "*",
|
||||
"ext-xml": "*",
|
||||
"ext-xmlreader": "*",
|
||||
"php": ">=7.2.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"donatj/mock-webserver": "^2.7",
|
||||
"friendsofphp/php-cs-fixer": "^2.19 || ^3.8",
|
||||
"mf2/mf2": "^0.5.0",
|
||||
"phpstan/phpstan": "~1.12.2",
|
||||
"phpunit/phpunit": "^8 || ^9 || ^10",
|
||||
"psr/http-client": "^1.0",
|
||||
"psr/http-factory": "^1.0",
|
||||
"psr/simple-cache": "^1 || ^2 || ^3"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-curl": "",
|
||||
"ext-iconv": "",
|
||||
"ext-intl": "",
|
||||
"ext-mbstring": "",
|
||||
"mf2/mf2": "Microformat module that allows for parsing HTML for microformats"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"psr-0": {
|
||||
"SimplePie": "library"
|
||||
},
|
||||
"psr-4": {
|
||||
"SimplePie\\": "src"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"BSD-3-Clause"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Ryan Parman",
|
||||
"homepage": "http://ryanparman.com/",
|
||||
"role": "Creator, alumnus developer"
|
||||
},
|
||||
{
|
||||
"name": "Sam Sneddon",
|
||||
"homepage": "https://gsnedders.com/",
|
||||
"role": "Alumnus developer"
|
||||
},
|
||||
{
|
||||
"name": "Ryan McCue",
|
||||
"email": "me@ryanmccue.info",
|
||||
"homepage": "http://ryanmccue.info/",
|
||||
"role": "Developer"
|
||||
}
|
||||
],
|
||||
"description": "A simple Atom/RSS parsing library for PHP",
|
||||
"homepage": "http://simplepie.org/",
|
||||
"keywords": [
|
||||
"atom",
|
||||
"feeds",
|
||||
"rss"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/simplepie/simplepie/issues",
|
||||
"source": "https://github.com/simplepie/simplepie/tree/1.9.0"
|
||||
},
|
||||
"time": "2025-09-12T06:34:27+00:00"
|
||||
},
|
||||
{
|
||||
"name": "spatie/laravel-package-tools",
|
||||
"version": "1.93.1",
|
||||
|
||||
@@ -52,22 +52,12 @@ const CLASS_ORDER: Record<string, number> = {
|
||||
}
|
||||
|
||||
const customKeySort = {
|
||||
class_seat_combined: (a: Flight['flight_class'], b: Flight['flight_class']) => {
|
||||
return (CLASS_ORDER[a?.name ?? ''] ?? -1) - (CLASS_ORDER[b?.name ?? ''] ?? -1)
|
||||
},
|
||||
airline: (a: Flight['airline'], b: Flight['airline']) => {
|
||||
return (a?.iata_code ?? '').localeCompare(b?.iata_code ?? '')
|
||||
},
|
||||
aircraft: (a: Flight['aircraft'], b: Flight['aircraft']) => {
|
||||
return (a?.designator ?? '').localeCompare(b?.designator ?? '')
|
||||
},
|
||||
class_seat_combined: (a: Flight['flight_class'], b: Flight['flight_class']) => (CLASS_ORDER[a?.name ?? ''] ?? -1) - (CLASS_ORDER[b?.name ?? ''] ?? -1),
|
||||
airline: (a: Flight['airline'], b: Flight['airline']) => (a?.iata_code ?? '').localeCompare(b?.iata_code ?? ''),
|
||||
aircraft: (a: Flight['aircraft'], b: Flight['aircraft']) => (a?.designator ?? '').localeCompare(b?.designator ?? ''),
|
||||
duration: (a: any, b: any) => (a ?? 0) - (b ?? 0),
|
||||
departure_airport: (a: Flight['departure_airport'], b: Flight['departure_airport']) => {
|
||||
return (a?.display_code ?? '').localeCompare(b?.display_code ?? '')
|
||||
},
|
||||
arrival_airport: (a: Flight['arrival_airport'], b: Flight['arrival_airport']) => {
|
||||
return (a?.display_code ?? '').localeCompare(b?.display_code ?? '')
|
||||
},
|
||||
departure_airport: (a: Flight['departure_airport'], b: Flight['departure_airport']) => (a?.display_code ?? '').localeCompare(b?.display_code ?? ''),
|
||||
arrival_airport: (a: Flight['arrival_airport'], b: Flight['arrival_airport']) => (a?.display_code ?? '').localeCompare(b?.display_code ?? '')
|
||||
}
|
||||
|
||||
const sortBy = ref<DataTableSortItem[]>([])
|
||||
|
||||
+1
-1
@@ -6,5 +6,5 @@ use Illuminate\Support\Facades\Artisan;
|
||||
Schedule::command('app:update-alliances')->dailyAt('09:00')->runInBackground();
|
||||
Schedule::command('app:update-departed-flights')->everyMinute()->runInBackground();
|
||||
Schedule::command('app:update-arrived-flights')->everyMinute()->runInBackground();
|
||||
Schedule::command('app:get-aircraft-info-for-arrived-flights')->hourly()->runInBackground();
|
||||
Schedule::command('app:get-aircraft-info-for-arrived-flights')->everyMinute()->runInBackground();
|
||||
Schedule::command('app:flight-feed-update')->everyMinute()->runInBackground();
|
||||
|
||||
Reference in New Issue
Block a user