Repository :
http://git.fedorahosted.org/cgit/
On branch : master
---------------------------------------------------------------
commit 282a9995b375b2c3acd7f4c447a5e5653a5693a8
Author: Matt Domsch <matt(a)domsch.com>
Date: Fri Jul 12 00:06:48 2013 -0500
crawler_perhost: add more flush() calls
---------------------------------------------------------------
server/crawler_perhost | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/server/crawler_perhost b/server/crawler_perhost
index 58cb531..f5beb6b 100755
--- a/server/crawler_perhost
+++ b/server/crawler_perhost
@@ -338,6 +338,7 @@ def sync_hcds(host, host_category_dirs):
else:
print >>logfile, d.name
+ logfile.flush()
current_hcds[hcd] = True
@@ -612,8 +613,10 @@ def mark_not_up2date(exc, host, reason="Unknown",
mail=True):
host.lastCrawled = datetime.utcnow()
msg = "Host marked not up2date: %s" % reason
print >> logfile, msg
+ logfile.flush()
if exc is not None:
print >> logfile, exc[0], exc[1], exc[2]
+ logfile.flush()
if mail:
send_email(host, msg, exc)
@@ -752,6 +755,7 @@ def per_host(host, options):
# could be a dir with no files, or an unreadable dir.
# defer decision on this dir, let a child decide.
pass
+ logfile.flush()
except TryLater:
timer.cancel()
msg = "Server load exceeded - try later"