diff options
Diffstat (limited to 'app/Libraries/Background.php')
| -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() { |
