Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
ensembl-gh-mirror
ensembl-hive
Commits
adc1a38a
Commit
adc1a38a
authored
Aug 12, 2010
by
Leo Gordon
Browse files
renamed for clarity
parent
f27c721c
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
11 additions
and
11 deletions
+11
-11
modules/Bio/EnsEMBL/Hive/AnalysisJob.pm
modules/Bio/EnsEMBL/Hive/AnalysisJob.pm
+5
-5
modules/Bio/EnsEMBL/Hive/RunnableDB/FailureTest.pm
modules/Bio/EnsEMBL/Hive/RunnableDB/FailureTest.pm
+1
-1
modules/Bio/EnsEMBL/Hive/Worker.pm
modules/Bio/EnsEMBL/Hive/Worker.pm
+3
-3
sql/patch_2010-08-11.sql
sql/patch_2010-08-11.sql
+1
-1
sql/tables.sql
sql/tables.sql
+1
-1
No files found.
modules/Bio/EnsEMBL/Hive/AnalysisJob.pm
View file @
adc1a38a
...
...
@@ -139,12 +139,12 @@ sub stderr_file {
return
$self
->
{'
_stderr_file
'};
}
sub
lethal
{
# Job should set this to 1 prior to dying (or before running code that might cause death - such as RunnableDB's compilation)
# if it believes that the state of things will not allow the Worker to continue normally.
# The Worker will check the flag and commit suicide if it is set to true.
sub
lethal
_for_worker
{
# Job should set this to 1 prior to dying (or before running code that might cause death - such as RunnableDB's compilation)
# if it believes that the state of things will not allow the Worker to continue normally.
# The Worker will check the flag and commit suicide if it is set to true.
my
$self
=
shift
;
$self
->
{'
_lethal
'}
=
shift
if
(
@
_
);
return
$self
->
{'
_lethal
'};
$self
->
{'
_lethal
_for_worker
'}
=
shift
if
(
@
_
);
return
$self
->
{'
_lethal
_for_worker
'};
}
sub
print_job
{
...
...
modules/Bio/EnsEMBL/Hive/RunnableDB/FailureTest.pm
View file @
adc1a38a
...
...
@@ -124,7 +124,7 @@ sub dangerous_math {
if
(
$value
%
$divisor
==
0
)
{
if
(
$value
>
10
)
{
# take the Worker with us into the grave
$self
->
input_job
->
lethal
(
1
);
$self
->
input_job
->
lethal
_for_worker
(
1
);
}
die
"
Preprogrammed death since
$value
is a multiple of
$divisor
";
...
...
modules/Bio/EnsEMBL/Hive/Worker.pm
View file @
adc1a38a
...
...
@@ -517,7 +517,7 @@ sub run
$self
->
db
()
->
get_JobErrorAdaptor
()
->
register_error
(
$job_id
,
$error_msg
);
$job
->
update_status
('
FAILED
');
if
(
$job
->
lethal
)
{
# either a compilation error or other job-sanctioned contamination
if
(
$job
->
lethal
_for_worker
)
{
# either a compilation error or other job-sanctioned contamination
warn
"
Job's error has contaminated the Worker, so the Worker will now die
\n
";
$self
->
cause_of_death
('
CONTAMINATED
');
last
BATCHES
;
...
...
@@ -593,9 +593,9 @@ sub run_module_with_job {
$self
->
enter_status
('
COMPILATION
');
$job
->
update_status
('
COMPILATION
');
$job
->
lethal
(
1
);
# if it dies in this state, it will kill the Worker
$job
->
lethal
_for_worker
(
1
);
# if it dies in this state, it will kill the Worker
my
$runObj
=
$self
->
analysis
->
process
or
die
"
Unknown compilation error
";
$job
->
lethal
(
0
);
# not dangerous anymore
$job
->
lethal
_for_worker
(
0
);
# not dangerous anymore
my
$native_hive_process
=
$runObj
->
isa
("
Bio::EnsEMBL::Hive::Process
");
...
...
sql/patch_2010-08-11.sql
View file @
adc1a38a
...
...
@@ -6,7 +6,7 @@ CREATE TABLE job_error (
worker_id int(10) NOT NULL,
died timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
retry_count int(10) DEFAULT 0 NOT NULL,
status enum('
COMPILATION
','
GET_INPUT
','
RUN
','
WRITE_OUTPUT
'),
status enum('
UNKNOWN
','
COMPILATION
','
GET_INPUT
','
RUN
','
WRITE_OUTPUT
')
DEFAULT '
UNKNOWN
'
,
error_msg text,
PRIMARY KEY (analysis_job_id, worker_id, died),
...
...
sql/tables.sql
View file @
adc1a38a
...
...
@@ -166,7 +166,7 @@ CREATE TABLE job_error (
worker_id
int
(
10
)
NOT
NULL
,
died
timestamp
NOT
NULL
DEFAULT
CURRENT_TIMESTAMP
,
retry_count
int
(
10
)
DEFAULT
0
NOT
NULL
,
status
enum
(
'COMPILATION'
,
'GET_INPUT'
,
'RUN'
,
'WRITE_OUTPUT'
),
status
enum
(
'UNKNOWN'
,
'COMPILATION'
,
'GET_INPUT'
,
'RUN'
,
'WRITE_OUTPUT'
)
DEFAULT
'UNKNOWN'
,
error_msg
text
,
PRIMARY
KEY
(
analysis_job_id
,
worker_id
,
died
),
...
...
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