aboutsummaryrefslogtreecommitdiff
path: root/steuermann/run_all.py
diff options
context:
space:
mode:
authorsienkiew <sienkiew@d34015c8-bcbb-4646-8ac8-8ba5febf221d>2011-10-07 10:23:25 -0400
committersienkiew <sienkiew@d34015c8-bcbb-4646-8ac8-8ba5febf221d>2011-10-07 10:23:25 -0400
commitabebc55cdd7cc2f9bf150cf4197ed6c4744de964 (patch)
tree1905bfc276562b4851857a8d0ad0e5ae04636c2f /steuermann/run_all.py
parent7368f281700d2c975fede59a976c21a4ce22fb8d (diff)
downloadsteuermann-abebc55cdd7cc2f9bf150cf4197ed6c4744de964.tar.gz
checkpoint
git-svn-id: https://svn.stsci.edu/svn/ssb/etal/steuermann/trunk@439 d34015c8-bcbb-4646-8ac8-8ba5febf221d
Diffstat (limited to 'steuermann/run_all.py')
-rw-r--r--steuermann/run_all.py16
1 files changed, 11 insertions, 5 deletions
diff --git a/steuermann/run_all.py b/steuermann/run_all.py
index 1e179a2..71cabd1 100644
--- a/steuermann/run_all.py
+++ b/steuermann/run_all.py
@@ -177,7 +177,7 @@ def run_interactive( xnodes, run_name, db) :
register_database(db, run_name, xnodes)
- runner = run.runner( xnodes, steuermann.config.logdir )
+ runner = run.runner( xnodes )
for x in xnodes :
xnodes[x].finished = 0
@@ -440,10 +440,7 @@ def run_step( runner, xnodes, run_name, db ) :
else :
try :
- if runner.run(x, run_name, no_run=no_run) :
- # returns true/false whether it actually ran it - it may not because of resource limits
- db.execute("UPDATE sm_status SET start_time = ?, status = 'R' WHERE ( run = ? AND host = ? AND tablename = ? AND cmd = ? )",
- ( str(datetime.datetime.now()), run_name, host, table, cmd ) )
+ tmp = runner.run(x, run_name, no_run=no_run, logfile = make_log_file_name(run_name, host, table, cmd) )
except run.run_exception, e :
now = str(datetime.datetime.now())
db.execute("UPDATE sm_status SET start_time=?, end_time=?, status='E', notes=? WHERE ( run=? AND host=? AND tablename=? AND cmd=? )",
@@ -451,6 +448,11 @@ def run_step( runner, xnodes, run_name, db ) :
x.finished = 1
no_sleep = 1
keep_running = 1
+ else :
+ if tmp :
+ # returns true/false whether it actually ran it - it may not because of resource limits
+ db.execute("UPDATE sm_status SET start_time = ?, status = 'R' WHERE ( run = ? AND host = ? AND tablename = ? AND cmd = ? )",
+ ( str(datetime.datetime.now()), run_name, host, table, cmd ) )
db.commit()
@@ -510,6 +512,10 @@ def info_callback_depth( db, run, tablename, host, cmd ) :
return n.depth
#####
+def make_log_file_name( run_name, table, host, cmd ) :
+ return '%s/run/%s/%s/%s/%s.log'%(steuermann.config.logdir, run_name, table, host, cmd)
+
if __name__ == '__main__' :
main()
+