Commit 3ef6e85f authored by Maude Le Jeune's avatar Maude Le Jeune
Browse files

bug #3913

parent e27ede60
......@@ -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)
......
......@@ -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