Browse Source

Round time in "throttled" log msg so it's a bit more realistic

tags/v0.1^2
Ben Kurtovic 12 years ago
parent
commit
af146bf070
2 changed files with 2 additions and 2 deletions
  1. +1
    -1
      earwigbot/managers.py
  2. +1
    -1
      earwigbot/wiki/site.py

+ 1
- 1
earwigbot/managers.py View File

@@ -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):


+ 1
- 1
earwigbot/wiki/site.py View File

@@ -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()


Loading…
Cancel
Save