diff --git a/app/Console/Commands/Grap.php b/app/Console/Commands/Grap.php index 62611355..3326c900 100644 --- a/app/Console/Commands/Grap.php +++ b/app/Console/Commands/Grap.php @@ -53,7 +53,7 @@ class Grap extends Command $txt .= '-----------------------------------------------------------' . PHP_EOL; $txt .= 'FUNCTION' . PHP_EOL; $txt .= ' 1 grapper DAILY & subDays ( default 3)' . PHP_EOL; - $txt .= ' 2 grapper LAST 3 DAYS' . PHP_EOL; + $txt .= ' 2 grapper MORE DAYS' . PHP_EOL; $txt .= ' 3 grapper RANGE' . PHP_EOL; $txt .= ' 4 grapper ROSE' . PHP_EOL; $txt .= ' 5 import to excel from folder' . PHP_EOL; @@ -90,6 +90,7 @@ class Grap extends Command self::$options['f'] = 1; if (self::$options['c']) { + SetStorage::set(1); ClearDir::clear(); } diff --git a/app/Console/Commands/Grapper/Sofascore/Grapper.php b/app/Console/Commands/Grapper/Sofascore/Grapper.php index 787ecfcd..fc1b5760 100644 --- a/app/Console/Commands/Grapper/Sofascore/Grapper.php +++ b/app/Console/Commands/Grapper/Sofascore/Grapper.php @@ -51,7 +51,7 @@ class Grapper /** * daily restart always */ - if ($task_id == 1 && $restart) { + if (\in_array($task_id, [1, 2])) { SofaScoreEventGrapped::where('grapper_id', $task_id)->delete(); } /** @@ -83,9 +83,9 @@ class Grapper if ($res) { - if ($debug) { - Notice::note($day, 'g'); - } + // if ($debug) { + // Notice::note($day, 'g'); + // } $url = Grap::$options['base_url'] . "api/v1/unique-tournament/$tournament->sofa_score_tournament_id/scheduled-events/$day"; diff --git a/app/Console/Commands/Grapper/Sofascore/Helper/ClearDir.php b/app/Console/Commands/Grapper/Sofascore/Helper/ClearDir.php index e8196943..77d06567 100644 --- a/app/Console/Commands/Grapper/Sofascore/Helper/ClearDir.php +++ b/app/Console/Commands/Grapper/Sofascore/Helper/ClearDir.php @@ -16,12 +16,12 @@ class ClearDir if ($dir) { $file->cleanDirectory($dir); if ($debug) { - Notice::note('Dir: ' . $dir . ' - removed', 'p'); + Notice::note('Folder removed', 'br'); } } else { $file->cleanDirectory(Grap::$storage); if ($debug) { - Notice::note('Dir: ' . Grap::$storage . ' - content deleted', 'p'); + Notice::note('Folder content deleted', 'br'); } } }