Skip to content

Commit

Permalink
Merge pull request #1 from greglange/ald_try_except
Browse files Browse the repository at this point in the history
added try/accept in access log delivery
  • Loading branch information
dpgoetz committed Dec 14, 2012
2 parents cab298f + acc5e17 commit fa0fb4e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion slogging/access_log_delivery.py
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,10 @@ def run_once(self, *a, **kw):
def run_forever(self, *a, **kw):
while True:
start_time = time.time()
self.run_once()
try:
self.run_once()
except Exception:
self.logger.exception('Run once failed')
end_time = time.time()
# don't run more than once every self.frequency seconds
sleep_time = self.frequency - (end_time - start_time)
Expand Down

0 comments on commit fa0fb4e

Please sign in to comment.