summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/Libraries/Background.php7
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() {