Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
ensembl-hive
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira
Code
Merge requests
7
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ensembl-gh-mirror
ensembl-hive
Commits
eb9c00c3
Commit
eb9c00c3
authored
17 years ago
by
Albert Vilella
Browse files
Options
Downloads
Patches
Plain Diff
adding check_if_exit_cleanly
parent
60c598cd
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/Bio/EnsEMBL/Hive/Process.pm
+30
-0
30 additions, 0 deletions
modules/Bio/EnsEMBL/Hive/Process.pm
with
30 additions
and
0 deletions
modules/Bio/EnsEMBL/Hive/Process.pm
+
30
−
0
View file @
eb9c00c3
...
...
@@ -478,5 +478,35 @@ sub output {
return
@
{
$self
->
{'
output
'}};
}
=head2 check_if_exit_cleanly
Title : check_if_exit_cleanly
Usage : $self->check_if_exit_cleanly()
Function: Check if we want to exit or kill it cleanly at the
runnable level
Returns : None
Args : None
=cut
sub
check_if_exit_cleanly
{
my
$self
=
shift
;
my
$id
=
$self
->
input_job
->
dbID
;
my
$honeycomb_dir
=
$self
->
{'
honeycomb_dir
'};
$honeycomb_dir
=~
s/\/$//
;
my
$not_allowed
=
$honeycomb_dir
.
"
/
"
.
"
relegate.
"
.
$id
;
my
$exit_cleanly
=
$honeycomb_dir
.
"
/
"
.
"
relegate.all
";
if
(
-
e
$not_allowed
)
{
$self
->
update_status
('
FAILED
');
throw
("
This job has been relegated to be killed -
$id
\n
");
}
elsif
(
-
e
$exit_cleanly
)
{
$self
->
update_status
('
READY
');
throw
("
This job has been relegated to be exited -
$id
\n
");
}
return
undef
;
}
1
;
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment