Commit 715be7a0 authored by Betoule Marc's avatar Betoule Marc
Browse files

small bugs

parent 547a9264
......@@ -131,7 +131,7 @@ class Pipeline:
self.compute_hash()
## string, sql data base
self.sqlfile=sqlfile
self.sqlfile=path.expanduser(path.expandvars(sqlfile))
## boolean, if true, turn the matplotlib backend to Agg
self.matplotlib = matplotlib
......
......@@ -65,7 +65,7 @@ class Repository:
return bool(self._ext_re.match(path.splitext(f)[1]))
def get_directive(self, Direct, seg):
c = self.get_code_string(seg)
c = self.get_code_string(seg)+'\n'.join(self._hook[seg].values())
d = Direct()
for l in c.splitlines():
try:
......@@ -252,7 +252,7 @@ class LocalRepository(Repository):
s = re.findall('^(.+?)\d+$',seg)[0]
f = [self.get_code_file(s)]
except:
raise Exception('No source file corresponding to segment')
raise Exception('No source file corresponding to segment %s'%seg)
return f[0]
def get_hook_file(self, seg, hook):
......
......@@ -62,6 +62,12 @@ def main(options, args):
signal.signal(signal.SIGABRT, catch_sigterm)
signal.signal(signal.SIGINT, catch_sigterm)
if options.buffer:
old = pipe.sqlfile
pipe.sqlfile = options.buffer
shutil.copy(old, options.buffer)
try:
# Launching the scheduler
class SchedulerManager(BaseManager):
......@@ -69,11 +75,11 @@ def main(options, args):
"""
pass
if options.buffer:
old = pipe.sqlfile
pipe.sqlfile = options.buffer
shutil.copy(old, options.buffer)
# Now that logging is set up decouple from parent environnement
redirect_stream(sys.stdin, None)
redirect_stream(sys.stdout, None)
redirect_stream(sys.stderr, None)
s = scheduler.Scheduler(pipe)
SchedulerManager.register('get_scheduler', callable=lambda:s)
......@@ -81,12 +87,6 @@ def main(options, args):
mgr.start()
print "Started"
# Now that logging is set up decouple from parent environnement
redirect_stream(sys.stdin, None)
redirect_stream(sys.stdout, None)
redirect_stream(sys.stderr, None)
os.chdir(WORKDIR)
sched_proxy = mgr.get_scheduler()
sched_proxy.run()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment