From af146bf0708fe12c3c85a0ac30bbe050abfe501e Mon Sep 17 00:00:00 2001 From: Ben Kurtovic Date: Mon, 9 Apr 2012 20:05:50 -0400 Subject: [PATCH] Round time in "throttled" log msg so it's a bit more realistic --- earwigbot/managers.py | 2 +- earwigbot/wiki/site.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/earwigbot/managers.py b/earwigbot/managers.py index 293894c..6c2531b 100644 --- a/earwigbot/managers.py +++ b/earwigbot/managers.py @@ -175,7 +175,7 @@ class TaskManager(_ResourceManager): msg = "Task '{0}' raised an exception and had to stop:" self.logger.exception(msg.format(task.name)) else: - msg = "Task '{0}' finished without error" + msg = "Task '{0}' finished successfully" self.logger.info(msg.format(task.name)) def start(self, task_name, **kwargs): diff --git a/earwigbot/wiki/site.py b/earwigbot/wiki/site.py index a7a4c8a..4a870bd 100644 --- a/earwigbot/wiki/site.py +++ b/earwigbot/wiki/site.py @@ -200,7 +200,7 @@ class Site(object): since_last_query = time() - self._last_query_time # Throttling support if since_last_query < self._wait_between_queries: wait_time = self._wait_between_queries - since_last_query - log = "Throttled: waiting {0} seconds".format(wait_time) + log = "Throttled: waiting {0} seconds".format(round(wait_time, 2)) self._logger.debug(log) sleep(wait_time) self._last_query_time = time()