summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorhorus2020-09-23 14:36:50 +0200
committerhorus2020-09-23 14:36:50 +0200
commit6f4c8f0630b6cb094566f9102f7c8cfd8be36239 (patch)
tree3d06e9a1adbe92b4888bd6bdcd87e1243ada0b46 /app
parentdc3df89aa73d9df48f92b22378a1307b4ddba3c7 (diff)
downloadsenpai-6f4c8f0630b6cb094566f9102f7c8cfd8be36239.tar.gz
stats_counter
Diffstat (limited to 'app')
-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() {