summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2021-02-28 12:23:36 +0300
committerAndrew Dolgov <[email protected]>2021-02-28 12:23:36 +0300
commitec55ed61eb1fb1ea56e4228f0bb25fd62d093246 (patch)
tree34d44446c65215f20393ca366e82a93c5fc690e0
parentb9ab3595a7c117131d4dcc99d3c0b32028dd8ed2 (diff)
reduce debugging
-rwxr-xr-xinit.php14
1 files changed, 7 insertions, 7 deletions
diff --git a/init.php b/init.php
index cae66c1..88fe15c 100755
--- a/init.php
+++ b/init.php
@@ -145,16 +145,16 @@ class Reddit_Delay extends Plugin {
$cutoff_timestamp = time() - ($delay * 60 * 60);
- Debug::log(sprintf("[delay] %s [%s vs %s]",
- $item->get_link(),
- date("Y-m-d H:i:s", $item->get_date()),
- date("Y-m-d H:i:s", $cutoff_timestamp)), Debug::$LOG_EXTENDED);
-
if ($item->get_date() > $cutoff_timestamp) {
+ Debug::log(sprintf("[delay] %s [%s vs %s]",
+ $item->get_link(),
+ date("Y-m-d H:i:s", $item->get_date()),
+ date("Y-m-d H:i:s", $cutoff_timestamp)), Debug::$LOG_EXTENDED);
+
if ($this->cache_exists($feed_id, $item->get_link())) {
- Debug::log("[delay] article is too new, already cached.", Debug::$LOG_EXTENDED);
+ Debug::log("[delay] already stored.", Debug::$LOG_EXTENDED);
} else {
- Debug::log("[delay] article is too new, delaying it.", Debug::$LOG_EXTENDED);
+ Debug::log("[delay] storing in the backlog.", Debug::$LOG_EXTENDED);
$this->cache_push($feed_id, $item, $entry);
}