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
71d56412
Commit
71d56412
authored
Jan 16, 2015
by
Leo Gordon
Browse files
capture all "dies" during worker->run() and try to record them in log_message
parent
2368ce0e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
8 deletions
+21
-8
modules/Bio/EnsEMBL/Hive/Queen.pm
modules/Bio/EnsEMBL/Hive/Queen.pm
+3
-3
scripts/runWorker.pl
scripts/runWorker.pl
+18
-5
No files found.
modules/Bio/EnsEMBL/Hive/Queen.pm
View file @
71d56412
...
...
@@ -302,9 +302,9 @@ sub register_worker_death {
if
(
$current_role
and
!
$current_role
->
when_finished
()
)
{
# List of cause_of_death:
# only happen before or after a batch: 'NO_ROLE','NO_WORK','JOB_LIMIT','HIVE_OVERLOAD','LIFESPAN',
'SEE_MSG'
# can happen whilst the worker is running a batch: 'CONTAMINATED','RELOCATED','KILLED_BY_USER','MEMLIMIT','RUNLIMIT','UNKNOWN'
my
$release_undone_jobs
=
(
$cause_of_death
=~
/^(CONTAMINATED|RELOCATED|KILLED_BY_USER|MEMLIMIT|RUNLIMIT|UNKNOWN)$/
);
# only happen before or after a batch: 'NO_ROLE','NO_WORK','JOB_LIMIT','HIVE_OVERLOAD','LIFESPAN','SEE_MSG'
# can happen whilst the worker is running a batch: 'CONTAMINATED','RELOCATED','KILLED_BY_USER','MEMLIMIT','RUNLIMIT','
SEE_MSG','
UNKNOWN'
my
$release_undone_jobs
=
(
$cause_of_death
=~
/^(CONTAMINATED|RELOCATED|KILLED_BY_USER|MEMLIMIT|RUNLIMIT|
SEE_MSG|
UNKNOWN)$/
);
$current_role
->
worker
(
$worker
);
# So that release_undone_jobs_from_role() has the correct cause_of_death and work_done
$current_role
->
when_finished
(
$worker_died
);
$self
->
db
->
get_RoleAdaptor
->
finalize_role
(
$current_role
,
$release_undone_jobs
);
...
...
scripts/runWorker.pl
View file @
71d56412
...
...
@@ -138,11 +138,24 @@ sub main {
$analyses_pattern
=
$analysis_id
;
}
$worker
->
run
(
{
-
analyses_pattern
=>
$analyses_pattern
,
-
job_id
=>
$job_id
,
-
force
=>
$force
,
}
);
eval
{
$worker
->
run
(
{
-
analyses_pattern
=>
$analyses_pattern
,
-
job_id
=>
$job_id
,
-
force
=>
$force
,
}
);
1
;
}
or
do
{
my
$msg
=
$@
;
$hive_dba
->
get_LogMessageAdaptor
()
->
store_worker_message
(
$worker
,
$msg
,
1
);
$worker
->
cause_of_death
(
'
SEE_MSG
'
);
$queen
->
register_worker_death
(
$worker
,
1
);
die
$msg
;
};
}
...
...
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