Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
genotoul-bioinfo
jflow
Commits
1002f0c7
Commit
1002f0c7
authored
Mar 28, 2013
by
Jerome Mariette
Browse files
more error displayed
parent
7b163e4c
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/jflow/workflow.py
View file @
1002f0c7
...
...
@@ -184,7 +184,7 @@ class Workflow(threading.Thread):
self
.
status
=
self
.
STATUS_FAILED
self
.
end_time
=
time
.
time
()
self
.
_serialize
()
raise
RuntimeError
(
'An error occurred when executing workflow: {0}'
.
format
(
e
))
raise
self
.
component_nameids_is_init
=
True
self
.
_serialize
()
try
:
...
...
@@ -193,7 +193,7 @@ class Workflow(threading.Thread):
self
.
status
=
self
.
STATUS_FAILED
self
.
end_time
=
time
.
time
()
self
.
_serialize
()
raise
RuntimeError
(
'An error occurred when executing workflow: {0}'
.
format
(
e
))
raise
if
len
(
self
.
components
)
>
0
:
self
.
_execute_weaver
()
self
.
_serialize
()
...
...
@@ -354,7 +354,7 @@ class Workflow(threading.Thread):
self
.
status
=
self
.
STATUS_FAILED
self
.
end_time
=
time
.
time
()
self
.
_serialize
()
raise
SyntaxError
(
'An error occurred when compiling script: {0}'
.
format
(
e
))
raise
self
.
components
=
[]
# Once a weaver script is compiled, serialize the workflow
self
.
_serialize
()
...
...
@@ -364,7 +364,7 @@ class Workflow(threading.Thread):
self
.
status
=
self
.
STATUS_FAILED
self
.
end_time
=
time
.
time
()
self
.
_serialize
()
raise
RuntimeError
(
'An error occurred when executing DAG from directory {0}'
.
format
(
current_working_directory
))
raise
def
_get_current_make
(
self
):
current_component
,
make_directory
,
new_make
=
[],
None
,
False
...
...
@@ -409,10 +409,8 @@ class Workflow(threading.Thread):
for
class_name
,
obj
in
inspect
.
getmembers
(
sys
.
modules
[
modname
],
inspect
.
isclass
):
if
issubclass
(
obj
,
jflow
.
component
.
Component
)
and
obj
.
__name__
!=
jflow
.
component
.
Component
.
__name__
:
pckge
[
class_name
]
=
modname
except
NameError
as
e
:
except
Exception
as
e
:
logging
.
getLogger
(
"Workflow._import_components"
).
debug
(
"Component <{0}> cannot be loaded: {1}"
.
format
(
modname
,
e
))
except
:
logging
.
getLogger
(
"Workflow._import_components"
).
debug
(
"Component <{0}> cannot be loaded"
.
format
(
modname
))
# finally import workflows shared packages
workflows_dir
=
os
.
path
.
dirname
(
os
.
path
.
dirname
(
inspect
.
getfile
(
self
.
__class__
)))
for
importer
,
modname
,
ispkg
in
pkgutil
.
iter_modules
([
os
.
path
.
join
(
workflows_dir
,
"components"
)],
"workflows.components."
):
...
...
@@ -421,8 +419,6 @@ class Workflow(threading.Thread):
for
class_name
,
obj
in
inspect
.
getmembers
(
sys
.
modules
[
modname
],
inspect
.
isclass
):
if
issubclass
(
obj
,
jflow
.
component
.
Component
)
and
obj
.
__name__
!=
jflow
.
component
.
Component
.
__name__
:
pckge
[
class_name
]
=
modname
except
NameError
as
e
:
logging
.
getLogger
(
"Workflow._import_components"
).
debug
(
"Component <{0}> cannot be loaded: {1}"
.
format
(
modname
,
e
))
except
Exception
as
e
:
logging
.
getLogger
(
"Workflow._import_components"
).
debug
(
"Component <{0}> cannot be loaded: {1}"
.
format
(
modname
,
e
))
return
pckge
...
...
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