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
715be7a0
Commit
715be7a0
authored
Oct 08, 2010
by
Betoule Marc
Browse files
small bugs
parent
547a9264
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
14 deletions
+14
-14
pipelet/pipeline.py
pipelet/pipeline.py
+1
-1
pipelet/repository.py
pipelet/repository.py
+2
-2
scripts/pipeletd
scripts/pipeletd
+11
-11
No files found.
pipelet/pipeline.py
View file @
715be7a0
...
...
@@ -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
...
...
pipelet/repository.py
View file @
715be7a0
...
...
@@ -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
):
...
...
scripts/pipeletd
View file @
715be7a0
...
...
@@ -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
()
...
...
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