Commit 7197dd72 authored by Jonathan Schaeffer's avatar Jonathan Schaeffer
Browse files

Better subprocess management

parent 4995128b
......@@ -145,9 +145,9 @@ def seedtree(content):
def wfcatalog(content):
# launch wfcatalog updates, 100 files for each run
for chunk in grouper(content.splitlines(), 50):"launching WFCatalog update on : %s" % str(chunk))"launching WFCatalog collector on : %s" % str(chunk))
files = json.dumps(chunk)
sp = subprocess.Popen(
sp =
......@@ -156,12 +156,10 @@ def wfcatalog(content):
], stdout=subprocess.PIPE)
(out, err) = sp.communicate()
if out:"WFCatalog standard output:\n%s", out.decode('utf-8'))
if err:"WFCatalog standard error:\n%s", err.decode('utf-8'))
], stdout=subprocess.PIPE, stderr=subprocess.PIPE)"WFCollector exit status: %s", sp.returncode)
logger.ingo("WFCollector stdout:\n%s", sp.stdout.decode())"WFCatalog stderr:\n%s", sp.stderr.decode())
if __name__ == "__main__":
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment