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
f9f9024e
Commit
f9f9024e
authored
10 years ago
by
Leo Gordon
Browse files
Options
Downloads
Patches
Plain Diff
API change: Q::check_nothing_to_run_but_semaphored() now takes an obligatory $list_of_analyses
parent
102cc96f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
modules/Bio/EnsEMBL/Hive/Queen.pm
+12
-4
12 additions, 4 deletions
modules/Bio/EnsEMBL/Hive/Queen.pm
modules/Bio/EnsEMBL/Hive/Scheduler.pm
+1
-1
1 addition, 1 deletion
modules/Bio/EnsEMBL/Hive/Scheduler.pm
with
13 additions
and
5 deletions
modules/Bio/EnsEMBL/Hive/Queen.pm
+
12
−
4
View file @
f9f9024e
...
...
@@ -620,10 +620,18 @@ sub synchronize_AnalysisStats {
}
sub
check_nothing_to_run_but_semaphored
{
# make sure it is run after a recent sync
my
(
$self
,
$filter_analysis
)
=
@_
;
=head2 check_nothing_to_run_but_semaphored
Arg [1] : $list_of_analyses
Example : $self->check_nothing_to_run_but_semaphored( [ $analysis_A, $analysis_B ] );
Description: Counts the number of immediately runnable jobs in the given analyses.
Exceptions : none
Caller : Scheduler
my
$list_of_analyses
=
$filter_analysis
?
[
$filter_analysis
]
:
$self
->
db
->
get_AnalysisAdaptor
->
fetch_all
;
=cut
sub
check_nothing_to_run_but_semaphored
{
# make sure it is run after a recent sync
my
(
$self
,
$list_of_analyses
)
=
@_
;
my
$only_semaphored_jobs_to_run
=
1
;
my
$total_semaphored_job_count
=
0
;
...
...
@@ -649,7 +657,7 @@ sub check_nothing_to_run_but_semaphored { # make sure it is run after a recent
or 1/0, depending on whether $filter_analysis failed or not.
Returntype : int
Exceptions : none
Caller :
genera
l
Caller :
beekeeper.p
l
=cut
...
...
This diff is collapsed.
Click to expand it.
modules/Bio/EnsEMBL/Hive/Scheduler.pm
+
1
−
1
View file @
f9f9024e
...
...
@@ -73,7 +73,7 @@ sub schedule_workers_resync_if_necessary {
$queen
->
synchronize_hive
(
$list_of_analyses
);
if
(
$queen
->
db
->
hive_auto_rebalance_semaphores
)
{
# make sure rebalancing only ever happens for the pipelines that asked for it
if
(
$queen
->
check_nothing_to_run_but_semaphored
)
{
# and double-check on our side
if
(
$queen
->
check_nothing_to_run_but_semaphored
(
$list_of_analyses
)
)
{
# and double-check on our side
print
"
Scheduler: looks like we may need re-balancing semaphore_counts...
\n
";
if
(
my
$rebalanced_jobs_counter
=
$queen
->
db
->
get_AnalysisJobAdaptor
->
balance_semaphores
(
$list_of_analyses
)
)
{
print
"
Scheduler: re-balanced
$rebalanced_jobs_counter
jobs, going through another re-synchronization...
\n
";
...
...
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