diff options
author | sienkiew <sienkiew@d34015c8-bcbb-4646-8ac8-8ba5febf221d> | 2011-10-03 17:51:04 -0400 |
---|---|---|
committer | sienkiew <sienkiew@d34015c8-bcbb-4646-8ac8-8ba5febf221d> | 2011-10-03 17:51:04 -0400 |
commit | 65e2418d2a82e1ae939dd402052e26ec3572c163 (patch) | |
tree | fbfd4cb8cdac54925b58e92063c23902419f9e53 /steuermann/run_all.py | |
parent | 2f80f0b4916c1776a2d59b25b83bda81d6e623a9 (diff) | |
download | steuermann-65e2418d2a82e1ae939dd402052e26ec3572c163.tar.gz |
checkpoint
git-svn-id: https://svn.stsci.edu/svn/ssb/etal/steuermann/trunk@435 d34015c8-bcbb-4646-8ac8-8ba5febf221d
Diffstat (limited to 'steuermann/run_all.py')
-rw-r--r-- | steuermann/run_all.py | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/steuermann/run_all.py b/steuermann/run_all.py index f670abe..1e179a2 100644 --- a/steuermann/run_all.py +++ b/steuermann/run_all.py @@ -11,6 +11,7 @@ import datetime import run import report import nodes +import getpass import steuermann.config @@ -22,6 +23,9 @@ try : except ImportError : readline = None + +username=getpass.getuser() + ##### def main() : @@ -68,7 +72,7 @@ def main() : if '-r' in opt : run_name = opt['-r'] else : - run_name = str(datetime.datetime.now()).replace(' ','_') + run_name = "user_%s_%s"%(username,str(datetime.datetime.now()).replace(' ','_')) db = steuermann.config.open_db() @@ -348,7 +352,7 @@ def print_pre(who, xnodes, depth) : def register_database(db, run, xnodes ) : c = db.cursor() - c.execute('INSERT INTO sm_runs ( run ) VALUES ( ? )', ( run, ) ) + c.execute('INSERT INTO sm_runs ( run, create_time ) VALUES ( ?, ? )', ( run, str(datetime.datetime.now()).replace(' ','_')) ) c = db.cursor() for x in xnodes : @@ -363,14 +367,17 @@ def register_database(db, run, xnodes ) : def run_all(xnodes, run_name, db) : + for x in xnodes : + x = xnodes[x] + x.finished = 0 + x.running = 0 + x.wanted = 1 + x.skip = 0 + register_database(db, run_name, xnodes) - runner = run.runner( xnodes ) + runner = run.runner( xnodes, steuermann.config.logdir ) - for x in xnodes : - xnodes[x].finished = 0 - xnodes[x].running = 0 - xnodes[x].wanted = 1 while 1 : ( keep_running, no_sleep ) = run_step( runner, xnodes, run_name, db ) |