finalized queueing and --clean parameter to recreate the locking

database. Fixes T80 and T88
This commit is contained in:
Markus Rosenstihl
2018-03-23 12:40:05 +01:00
parent 113cc82684
commit a4cf5be73a
2 changed files with 8 additions and 7 deletions

View File

@ -35,12 +35,14 @@ import damaris.gui.DamarisGUI
lockfile = os.path.expanduser('~/.damaris.lockdb')
if args.clean:
if os.path.exists(lockfile):
print "Removing lockfile: %s"%lockfile
os.remove(lockfile)
else:
print "Lockfile does not exists: %s"%lockfile
lockdb = sqlite3.connect(lockfile)
c = lockdb.cursor()
c.execute("CREATE TABLE IF NOT EXISTS damaris (uuid text, status text)")
print "Make sure experiment table exists"
lockdb.commit()
if args.debug:
@ -54,7 +56,6 @@ if args.debug:
matplotlib.rcParams["verbose.level"] = "debug"
print args
d = damaris.gui.DamarisGUI.DamarisGUI(args.exp_script, args.res_script, start_immediately=args.run)
print "run"
d.run()
#for exp_script, res_script in args.exp_res_script: