finalized queueing and --clean parameter to recreate the locking
database. Fixes T80 and T88
This commit is contained in:
parent
113cc82684
commit
a4cf5be73a
@ -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:
|
||||
|
@ -211,11 +211,12 @@ class DamarisGUI:
|
||||
|
||||
if start_immediately:
|
||||
if exp_script and res_script:
|
||||
self.start_immediatly = start_immediately
|
||||
self.start_immediately = start_immediately
|
||||
else:
|
||||
raise ("RuntimeError", "experiment and result scripts not given,\
|
||||
aborting immediate start of experiment")
|
||||
|
||||
else:
|
||||
self.start_immediately = False
|
||||
self.statusbar_init( )
|
||||
|
||||
self.main_window.maximize()
|
||||
@ -271,9 +272,9 @@ class DamarisGUI:
|
||||
# prolong lifetime of clipboard till the very end (avoid error message)
|
||||
self.main_clipboard = self.sw.main_clipboard
|
||||
gtk.gdk.threads_enter( )
|
||||
if self.start_immediatly:
|
||||
self.toolbar_run_button.emit("clicked")
|
||||
|
||||
if self.start_immediately:
|
||||
self.toolbar_run_button.emit("clicked")
|
||||
gtk.main( )
|
||||
gtk.gdk.threads_leave( )
|
||||
self.si = None
|
||||
@ -3206,7 +3207,6 @@ class ScriptInterface:
|
||||
self.data = DataPool( )
|
||||
|
||||
def runScripts( self ):
|
||||
|
||||
try:
|
||||
# get script engines
|
||||
self.exp_handling = self.res_handling = None
|
||||
|
Loading…
Reference in New Issue
Block a user