wip
This commit is contained in:
1 parent
d221ff6eac
commit
8ade164b9d
1 file changed
+14
-13
@@ -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(
|
||||
|
||||
Reference in new issue
Block a user