diff options
author | sienkiew <sienkiew@d34015c8-bcbb-4646-8ac8-8ba5febf221d> | 2011-09-19 12:02:23 -0400 |
---|---|---|
committer | sienkiew <sienkiew@d34015c8-bcbb-4646-8ac8-8ba5febf221d> | 2011-09-19 12:02:23 -0400 |
commit | 245dcb86e2632a315aafa2a936dbc66c3de56be9 (patch) | |
tree | fb52049bda75fd03bb95b65b33612b1691bd58de /steuermann/run_all.py | |
parent | acedd0fe3b909516fa83ae14b4c4f731641eb4b3 (diff) | |
download | steuermann-245dcb86e2632a315aafa2a936dbc66c3de56be9.tar.gz |
implement maxproc for each host
git-svn-id: https://svn.stsci.edu/svn/ssb/etal/steuermann/trunk@422 d34015c8-bcbb-4646-8ac8-8ba5febf221d
Diffstat (limited to 'steuermann/run_all.py')
-rw-r--r-- | steuermann/run_all.py | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/steuermann/run_all.py b/steuermann/run_all.py index 38f8241..1c6fe28 100644 --- a/steuermann/run_all.py +++ b/steuermann/run_all.py @@ -145,6 +145,22 @@ def run_interactive( xnodes, run_name, db) : if n == '?' : print helpstr + elif n == 'd' : + run.debug=0 + if len(l) > 1 : + for x in l[1:] : + print "XXXXXXXXXX" + print "SECTION",x + print runner.get_host_info(x) + print "" + else : + for x in runner.cfg.sections() : + print "XXXXXXXXXX" + print "SECTION",x + print runner.get_host_info(x) + print "" + run.debug=0 + elif n == 'report' : print report.report_text( db, run_name ) @@ -320,12 +336,12 @@ def run_step( runner, xnodes, run_name, db ) : # of predecessors, we can run this one if released == len(x.released) : host, table, cmd = nodes.crack_name(x_name) - # print "RUN NODE", x_name - db.execute("UPDATE status SET start_time = ?, status = 'S' WHERE ( run = ? AND host = ? AND tablename = ? AND cmd = ? )", - ( str(datetime.datetime.now()), run_name, host, table, cmd ) ) - db.commit() - runner.run(x, run_name) + if runner.run(x, run_name) : + # returns true/false whether it actually ran it - it may not because of resource limits + db.execute("UPDATE status SET start_time = ?, status = 'S' WHERE ( run = ? AND host = ? AND tablename = ? AND cmd = ? )", + ( str(datetime.datetime.now()), run_name, host, table, cmd ) ) + db.commit() # if anything has exited, we process it and update the status in the database while 1 : |