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
e76e0cae
Commit
e76e0cae
authored
May 13, 2016
by
Matthieu Muffato
Browse files
Moved this code to a function to make create_new_worker clearer
parent
a97afa4c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletion
+9
-1
modules/Bio/EnsEMBL/Hive/Queen.pm
modules/Bio/EnsEMBL/Hive/Queen.pm
+9
-1
No files found.
modules/Bio/EnsEMBL/Hive/Queen.pm
View file @
e76e0cae
...
...
@@ -122,7 +122,7 @@ sub create_new_worker {
my
$meadow_type
=
$meadow
->
type
;
my
$meadow_name
=
$meadow
->
cached_name
;
foreach
my
$prev_worker_incarnation
(
@
{
$self
->
f
etch_all
(
"
status!='DEAD' AND meadow_type='
$meadow_type
' AND meadow_name='
$meadow_name
' AND process_id='
$process_id
'
"
)
})
{
foreach
my
$prev_worker_incarnation
(
@
{
$self
->
f
ind_previous_worker_incarnations
(
$meadow_type
,
$meadow_name
,
$process_id
)
})
{
# so far 'RELOCATED events' has been detected on LSF 9.0 in response to sending signal #99 or #100
# Since I don't know how to avoid them, I am trying to register them when they happen.
# The following snippet buries the previous incarnation of the Worker before starting a new one.
...
...
@@ -466,6 +466,14 @@ sub check_for_dead_workers { # scans the whole Valley for lost Workers (but i
}
# To tackle the RELOCATED event: this method checks whether there are already workers with these attributes
sub
find_previous_worker_incarnations
{
my
(
$self
,
$meadow_type
,
$meadow_name
,
$process_id
)
=
@_
;
return
$self
->
fetch_all
(
"
status!='DEAD' AND meadow_type='
$meadow_type
' AND meadow_name='
$meadow_name
' AND process_id='
$process_id
'
"
);
}
# a new version that both checks in and updates the status
sub
check_in_worker
{
my
(
$self
,
$worker
)
=
@_
;
...
...
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