diff options
| author | horus | 2020-09-23 14:36:50 +0200 |
|---|---|---|
| committer | horus | 2020-09-23 14:36:50 +0200 |
| commit | 6f4c8f0630b6cb094566f9102f7c8cfd8be36239 (patch) | |
| tree | 3d06e9a1adbe92b4888bd6bdcd87e1243ada0b46 /app | |
| parent | dc3df89aa73d9df48f92b22378a1307b4ddba3c7 (diff) | |
| download | senpai-6f4c8f0630b6cb094566f9102f7c8cfd8be36239.tar.gz | |
stats_counter
Diffstat (limited to 'app')
| -rw-r--r-- | app/Libraries/Background.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/app/Libraries/Background.php b/app/Libraries/Background.php index 5334480..2985f79 100644 --- a/app/Libraries/Background.php +++ b/app/Libraries/Background.php @@ -147,16 +147,21 @@ class Background { } } - echo "Getting stats for " . $entry->mal_id ."\n"; + $stats_counter = 0; $animeStats = new AnimeStats(); + if ( $animeStats->fill($entry->mal_id) ) { # Only save if no error $animeStats->save(); + + $stats_counter++; } # sleep to avoid 403 sleep(5); } + + echo "Got stats for " . $stats_counter . " anime.\n"; } public function checkIfIsAiring() { |
