wip
This commit is contained in:
1 parent
8ffd838a27
commit
acf1b78c47
4 files changed
+8
-13
No files matched your search
@@ -9,9 +9,9 @@ class GrapperDaily extends Command
|
||||
{
|
||||
use GrappingSofascore;
|
||||
|
||||
protected $signature = 'grp:day {--d} {--r} {--f}';
|
||||
protected $signature = 'grp:daily {--d} {--r} {--f}';
|
||||
|
||||
protected $description = 'grap daily';
|
||||
protected $description = 'grap sofascore daily';
|
||||
|
||||
public function handleGrapper(): void
|
||||
{
|
||||
|
||||
@@ -59,10 +59,6 @@ trait GrappingTournaments
|
||||
while ($page) {
|
||||
// $data = $this->curl($url);
|
||||
|
||||
if ($this->debug) {
|
||||
Notice::note('⚽ close all vpn and load tournaments');
|
||||
}
|
||||
|
||||
$this->sleep();
|
||||
|
||||
$url = $this->base_url."api/v1/sport/$slug/scheduled-tournaments/$day/page/$page";
|
||||
@@ -186,10 +182,6 @@ trait GrappingTournaments
|
||||
Notice::note("$day Tournaments loaded", 'bb');
|
||||
}
|
||||
|
||||
if ($this->debug) {
|
||||
Notice::note('⚽ close all vpn');
|
||||
}
|
||||
|
||||
$this->day_tournaments = SofaScoreDayTournament::where('day', $day)->get();
|
||||
|
||||
if ($this->debug) {
|
||||
|
||||
@@ -291,8 +291,11 @@ trait UpdateHelper
|
||||
SofaScorePlayerPerSeason::whereIn('id', $idsToDelete)->delete();
|
||||
}
|
||||
|
||||
Mail::to('hermann.telser@gmail.com')->send(new SimpleMail('STATISTIKO', 'Pre Calculation Completed'));
|
||||
// Mail::to(['hermann.telser@gmail.com', 'ubaldo.perrucci@gmail.com'])->send(new SimpleMail('STATISTIKO', 'Pre Calculation Completed'));
|
||||
SofaScorePlayerPerSeason::where('ss_player_id', 0)->delete();
|
||||
SofaScorePlayerPerSeason::where('season', null)->delete();
|
||||
|
||||
// Mail::to('hermann.telser@gmail.com')->send(new SimpleMail('STATISTIKO', 'Pre Calculation Completed'));
|
||||
Mail::to(['hermann.telser@gmail.com', 'ubaldo.perrucci@gmail.com'])->send(new SimpleMail('STATISTIKO', 'Pre Calculation Completed'));
|
||||
}
|
||||
|
||||
private function array_template(array &$collection, int $ss_player_id, string $season)
|
||||
|
||||
+1
-1
@@ -31,7 +31,7 @@ return new class extends Migration
|
||||
$table->integer('shots_off_target')->default(0)->nullable();
|
||||
$table->integer('shots_blocked')->default(0)->nullable();
|
||||
$table->integer('total_shots')->default(0)->nullable();
|
||||
$table->unique(['ss_player_id', 'ss_team_id', 'season']);
|
||||
$table->unique(['ss_player_id', 'season']);
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user