Repository :
http://git.fedorahosted.org/cgit/
On branch : master
---------------------------------------------------------------
commit 09ede2c737d3e7d70b7befa223fd9bf4065a98a9
Author: Matt Domsch <matt(a)domsch.com>
Date: Wed Jul 24 17:11:01 2013 -0500
crawler: record crawler_perhost stderr in case of failures
---------------------------------------------------------------
server/crawler | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/server/crawler b/server/crawler
index efbdba5..2486ce5 100755
--- a/server/crawler
+++ b/server/crawler
@@ -79,7 +79,8 @@ class ForkingMaster:
def process_request(self, command, args, host):
"""Fork a new subprocess to process the
request."""
logger.info("Starting crawler %s: %s" % (host.name, args))
- p = Popen(args, executable=command, stdin=self.devnull, stdout=self.devnull,
stderr=self.devnull, close_fds=True)
+ stderr = open(os.path.join(options.logdir, "%d-stderr.log" % host.id),
'r+')
+ p = Popen(args, executable=command, stdin=self.devnull, stdout=self.devnull,
stderr=stderr, close_fds=True)
self.start_time(p, host.id)
logger.debug("Adding child pid %d" % p.pid)
self.active_children.append(p)