This commit is contained in:
salam committed 2026-09-22 23:25:12 +02:00
1 parent b72b99273f
commit d38cca91d4
3 files changed
+8 -7

No files matched your search

+2 -1
View File
@@ -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();
}
@@ -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";
@@ -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');
}
}
}