Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
pipelet
Pipelet
Commits
384c18d7
Commit
384c18d7
authored
Feb 13, 2013
by
Betoule Marc
Browse files
Merge branch 'master' of gitorious.org:pipelet/pipelet
parents
a1e1ac29
7c86d660
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
5 deletions
+6
-5
pipelet/task.py
pipelet/task.py
+1
-1
pipelet/treeview.py
pipelet/treeview.py
+2
-1
pipelet/utils.py
pipelet/utils.py
+3
-3
No files found.
pipelet/task.py
View file @
384c18d7
...
...
@@ -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
)
...
...
pipelet/treeview.py
View file @
384c18d7
...
...
@@ -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'
]
...
...
pipelet/utils.py
View file @
384c18d7
...
...
@@ -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
():
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment