This commit is contained in:
salam committed 2026-08-18 18:39:34 +02:00
1 parent 537dad3327
commit ff5d8bda1b
3 files changed
+20 -8

No files matched your search

+10 -5
View File
@@ -56,6 +56,7 @@ class Grap extends Command
switch (self::$options['id']) {
case 1:
// DAILY
SetStorage::set(1);
// MoveToArchive::move(1);
@@ -67,20 +68,24 @@ class Grap extends Command
SendMail::run(1);
break;
// case 2:
// SetStorage::set();
case 2:
// DATE
// SetStorage::set();
// Grapper::load(2);
// break;
// Grapper::load(2);
break;
case 3:
// RANGE
SetStorage::set(3);
// Grapper::load(3);
Grapper::load(3);
MakeExcel::create();
break;
case 4:
// ROSE
SetStorage::set(4);
Rose::run();
@@ -42,6 +42,7 @@ class SetStorage
case 4:
Grap::$storage = $sofascore_data . $storage_name;
Grap::$folder = 'rosa-' . Carbon::now()->format('Y-m-d');
Grap::$excel = Grap::$storage . '/rosa-' . Carbon::now()->format('Y-m-d');
break;
case 5:
Grap::$storage = $sofascore_data;
@@ -54,8 +55,8 @@ class SetStorage
}
if ($debug) {
Notice::note(Grap::$folder, 'bb');
Notice::note(Grap::$storage);
Notice::note(Grap::$folder, 'g');
// Notice::note(Grap::$storage);
sleep(4);
}
}
@@ -17,12 +17,18 @@ class Rose
$debug = Grap::$options['d'] ?? 0;
$restart = Grap::$options['r'] ?? 0;
if ($debug && !$restart) {
Notice::note("RESTART ?", 'bb');
sleep(5);
}
File::makeDirectory(Grap::$storage . '/' . Grap::$folder, 0775, true, true);
if ($restart) {
SofaScoreRosa::query()->update(['grapped' => 0]);
if ($debug) {
Notice::note('restarted grapper', 'bb');
Notice::note('reset all grapped to 0', 'r', 1);
}
} else {
if ($debug) {