fix update player

This commit is contained in:
salam committed 2026-09-11 10:36:16 +02:00
1 parent e3f1e8a8d9
commit f028a8b2a8
16 files changed
+605 -224

No files matched your search

+25 -23
View File
@@ -2,7 +2,6 @@
namespace App\Console\Commands;
use App\Actions\PlayerPerSeason;
use App\Console\Commands\Grapper\Sofascore\Grapper;
use App\Console\Commands\Grapper\Sofascore\GrapperTest;
use App\Console\Commands\Grapper\Sofascore\Helper\SetStorage;
@@ -11,11 +10,14 @@ use App\Console\Commands\Grapper\Sofascore\Rose;
use App\Console\Commands\Grapper\Sofascore\SendMail;
use App\Console\Commands\Grapper\Sofascore\SettingsToLocal;
use App\Console\Commands\Grapper\Sofascore\SqlMover;
use App\Traits\UpdatePlayerSeasonHelper;
use App\Utilities\Notice;
use Illuminate\Console\Command;
class Grap extends Command
{
use UpdatePlayerSeasonHelper;
public static $options = [];
public static string $storage;
@@ -38,29 +40,29 @@ class Grap extends Command
self::$options['base_url'] = 'https://www.sofascore.com/';
if (! self::$options['id']) {
$txt = 'PARAMETERS' . PHP_EOL;
$txt .= '--d debug' . PHP_EOL;
$txt .= '--r restart range' . PHP_EOL;
$txt .= '--f force' . PHP_EOL;
$txt .= '--m mail only' . PHP_EOL;
$txt .= '--R read file' . PHP_EOL;
$txt .= '--S save to file' . PHP_EOL;
$txt .= '--folder' . PHP_EOL;
$txt .= '-----------------------------------------------------------' . PHP_EOL;
$txt .= 'FUNCTION' . PHP_EOL;
$txt .= ' 1 grapper DAILY & subDays ( default 3)' . PHP_EOL;
$txt .= ' 2 grapper DATE' . PHP_EOL;
$txt .= ' 3 grapper RANGE' . PHP_EOL;
$txt .= ' 4 grapper ROSE' . PHP_EOL;
$txt .= ' 5 import to excel from folder' . PHP_EOL;
$txt .= ' 6 PlayerPerSeason pre calcuation' . PHP_EOL;
$txt .= ' 7 settings to local' . PHP_EOL;
$txt .= ' 11 move SQL' . PHP_EOL;
$txt .= ' 12 testing url for grapping' . PHP_EOL;
$txt = 'PARAMETERS'.PHP_EOL;
$txt .= '--d debug'.PHP_EOL;
$txt .= '--r restart range'.PHP_EOL;
$txt .= '--f force'.PHP_EOL;
$txt .= '--m mail only'.PHP_EOL;
$txt .= '--R read file'.PHP_EOL;
$txt .= '--S save to file'.PHP_EOL;
$txt .= '--folder'.PHP_EOL;
$txt .= '-----------------------------------------------------------'.PHP_EOL;
$txt .= 'FUNCTION'.PHP_EOL;
$txt .= ' 1 grapper DAILY & subDays ( default 3)'.PHP_EOL;
$txt .= ' 2 grapper DATE'.PHP_EOL;
$txt .= ' 3 grapper RANGE'.PHP_EOL;
$txt .= ' 4 grapper ROSE'.PHP_EOL;
$txt .= ' 5 import to excel from folder'.PHP_EOL;
$txt .= ' 6 update PlayerPerSeason'.PHP_EOL;
$txt .= ' 7 settings to local'.PHP_EOL;
$txt .= ' 11 move SQL'.PHP_EOL;
$txt .= ' 12 testing url for grapping'.PHP_EOL;
Notice::note($txt, 'b', 1);
}
Notice::note('Task Id ' . self::$options['id'], 'gb');
Notice::note('Task Id '.self::$options['id'], 'gb');
switch (self::$options['id']) {
@@ -70,7 +72,7 @@ class Grap extends Command
// MoveToArchive::move(1);
// with --m just resend mail
if (!self::$options['m']) {
if (! self::$options['m']) {
Grapper::load(1);
MakeExcel::create();
}
@@ -104,7 +106,7 @@ class Grap extends Command
break;
case 6:
PlayerPerSeason::run();
$this->update(1000000);
break;
case 7: