diff --git a/app/Traits/Sofascore/GrappingSofascore.php b/app/Traits/Sofascore/GrappingSofascore.php index 3791b3bf..52c2bd34 100644 --- a/app/Traits/Sofascore/GrappingSofascore.php +++ b/app/Traits/Sofascore/GrappingSofascore.php @@ -26,6 +26,7 @@ trait GrappingSofascore protected int $debug; protected int $restart; + protected int $speed; protected int $force; @@ -153,20 +154,20 @@ trait GrappingSofascore /** * day 1 */ - $day = Carbon::now()->subDay()->format('Y-m-d'); + // $day = Carbon::now()->subDay()->format('Y-m-d'); - $res = SofaScoreTaskDay::where('grapper_id', (int) $this->task_id)->where('day', $day)->first(); + // $res = SofaScoreTaskDay::where('grapper_id', (int) $this->task_id)->where('day', $day)->first(); - if (! $res) { - $this->grapped_files = $this->get_tree($this->data_dir . '/' . $day); + // if (! $res) { + // $this->grapped_files = $this->get_tree($this->data_dir . '/' . $day); - $this->grap_tournaments_for_day($day); + // $this->grap_tournaments_for_day($day); - foreach ($this->tournaments_requested as $tournament) { - $this->get_event($day, $tournament); - } - SofaScoreTaskDay::updateOrCreate(['grapper_id' => (int) $this->task_id, 'day' => $day], ['done' => 1]); - } + // foreach ($this->tournaments_requested as $tournament) { + // $this->get_event($day, $tournament); + // } + // SofaScoreTaskDay::updateOrCreate(['grapper_id' => (int) $this->task_id, 'day' => $day], ['done' => 1]); + // } /** * day 5 */ @@ -176,7 +177,7 @@ trait GrappingSofascore if (! $res) { - $this->grapped_files = $this->get_tree($this->data_dir . '/' . $day); + $this->grapped_files = $this->get_tree($this->data_dir.'/'.$day); $this->grap_tournaments_for_day($day); @@ -339,8 +340,6 @@ trait GrappingSofascore ); } - - protected function select_day(): string { return text( @@ -362,6 +361,7 @@ trait GrappingSofascore ] ); } + protected function ask_speed(): int { return select( @@ -374,6 +374,7 @@ trait GrappingSofascore ] ); } + protected function select_what_delete(): string { return select(