Commit 102021c8 authored by Matthieu Muffato's avatar Matthieu Muffato
Browse files

bugfix: only the pending workers of the current user should limit the scheduler

because on the farm, jobs from different users are scheduled independently
parent 13c2b465
......@@ -405,10 +405,10 @@ sub registered_workers_attributes {
}
sub get_submitted_worker_counts_by_meadow_type_rc_name {
my $self = shift @_;
sub get_submitted_worker_counts_by_meadow_type_rc_name_for_meadow_user {
my ($self, $meadow_user) = @_;
my $worker_counts_by_meadow_type_rc_id = $self->count_all("status='SUBMITTED'", ['meadow_type', 'resource_class_id'] );
my $worker_counts_by_meadow_type_rc_id = $self->count_all("status='SUBMITTED' AND meadow_user='$meadow_user'", ['meadow_type', 'resource_class_id'] );
my $cached_resource_mapping = $self->cached_resource_mapping;
my %counts_by_meadow_type_rc_name = ();
......
......@@ -40,6 +40,7 @@ use warnings;
use List::Util ('shuffle');
use Bio::EnsEMBL::Hive::Limiter;
use Bio::EnsEMBL::Hive::Utils;
sub scheduler_say {
......@@ -98,7 +99,7 @@ sub schedule_workers_resync_if_necessary {
}
# adjustment for pending workers:
my $pending_worker_counts_by_meadow_type_rc_name = $queen->get_submitted_worker_counts_by_meadow_type_rc_name;
my $pending_worker_counts_by_meadow_type_rc_name = $queen->get_submitted_worker_counts_by_meadow_type_rc_name_for_meadow_user(Bio::EnsEMBL::Hive::Utils::whoami());
while( my ($this_meadow_type, $partial_workers_to_submit_by_rc_name) = each %$workers_to_submit_by_meadow_type_rc_name) {
while( my ($this_rc_name, $workers_to_submit_this_group) = each %$partial_workers_to_submit_by_rc_name) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment