Commit 384c18d7 authored by Betoule Marc's avatar Betoule Marc
Browse files

Merge branch 'master' of gitorious.org:pipelet/pipelet

parents a1e1ac29 7c86d660
......@@ -100,7 +100,7 @@ class Task:
fn, string file name
"""
with closing(file(fn, 'w')) as f:
r = pickle.dump(dict({'parents':self.str_parents, 'queued_on':self.queued_on, 'ended_on':self.ended_on, 'begun_on':self.begun_on, 'input':pickle.dumps(self.task_input), 'output':pickle.dumps(self.task_output), 'status':self.status}),f)
r = pickle.dump(dict({'id':self.id, 'parents':self.str_parents, 'queued_on':self.queued_on, 'ended_on':self.ended_on, 'begun_on':self.begun_on, 'input':pickle.dumps(self.task_input), 'output':pickle.dumps(self.task_output), 'status':self.status}),f)
......
......@@ -473,7 +473,8 @@ class TreeView:
datlist.append(filename)
except IndexError:
datlist.append(filename)
codedir = directory.split("data")[0]
kk = directory.split("data")[-1]
codedir = directory.replace ("data"+kk, "")
codelist=glob(codedir+"*.*")
biglist = [sorted(loglist), sorted(datlist), sorted(imglist), sorted(codelist)]
name = ['LOGS', 'DATA', 'FIGURES', 'CODE']
......
......@@ -480,10 +480,10 @@ def rebuild_db_from_disk(pipedir, sqlfile=None):
task_depend_cache[t] = meta['parents']
## insert values in db
task_id_cache[t] = t.split("_")[-2].split("/")[-1]
input = None
c = conn.execute('insert into tasks (task_id, seg_id, output, input, begun_on, ended_on, queued_on,status,str_input) values (?, ?, ?, ?, ?, ?, ?, ?, ?)',(task_id_cache[t], v, pickle.dumps(meta["output"]), pickle.dumps(meta["input"]), meta["begun_on"], meta["ended_on"], meta["queued_on"], meta["status"],t))
task_id_cache[t] = meta['id']#t.split("_")[-2].split("/")[-1]
c = conn.execute('insert into tasks (task_id, seg_id, output, input, begun_on, ended_on, queued_on,status,str_input) values (?, ?, ?, ?, ?, ?, ?, ?, ?)',(task_id_cache[t], v, pickle.dumps(meta["output"]), pickle.dumps(meta["input"]), meta["begun_on"], meta["ended_on"], meta["queued_on"], meta["status"],t))
## 5---: task_relations from meta + task input
## need to restart the loop in order to use the right task_id
for k,v in task_id_cache.items():
......
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