@@ -155,7 +155,12 @@ def generate_glidein_requests(self, jobs_df, slots_df, entries, factory_globals,
155155 ########################################################################
156156
157157 # List of glideids that have idle jobs
158- glideids_with_idle_jobs = job_types ["Idle" ]["count" ].keys ()
158+ glideids_to_advertise = set (job_types ["Idle" ]["count" ].keys ())
159+
160+ # List of glideids that have active slots
161+ for glideid in self .glideid_list :
162+ if self .count_entry_slots [glideid [1 ]]["Total" ] > 0 :
163+ glideids_to_advertise .add (glideid )
159164
160165 # For faster lookup
161166 self .processed_glideid_strs = []
@@ -166,7 +171,7 @@ def generate_glidein_requests(self, jobs_df, slots_df, entries, factory_globals,
166171
167172 # Get the FOM info and generate requests based on the FOM
168173
169- for glideid in glideids_with_idle_jobs :
174+ for glideid in glideids_to_advertise :
170175 if glideid == (None , None ):
171176 # Ignore the unmatched entries
172177 continue
@@ -1500,7 +1505,12 @@ def generate_glidein_requests_one(self, jobs_df, slots_df, entries, factory_glob
15001505 ########################################################################
15011506
15021507 # List of glideids that have idle jobs
1503- glideids_with_idle_jobs = job_types ["Idle" ]["count" ].keys ()
1508+ glideids_to_advertise = set (job_types ["Idle" ]["count" ].keys ())
1509+
1510+ # List of glideids that have active slots
1511+ for glideid in self .glideid_list :
1512+ if self .count_entry_slots [glideid [1 ]]["Total" ] > 0 :
1513+ glideids_to_advertise .add (glideid )
15041514
15051515 # For faster lookup
15061516 self .processed_glideid_strs = []
@@ -1509,7 +1519,7 @@ def generate_glidein_requests_one(self, jobs_df, slots_df, entries, factory_glob
15091519 total_up_stats_arr = init_factory_stats_arr ()
15101520 total_down_stats_arr = init_factory_stats_arr ()
15111521
1512- for glideid in glideids_with_idle_jobs :
1522+ for glideid in glideids_to_advertize :
15131523 if glideid == (None , None ):
15141524 # Ignore the unmatched entries
15151525 continue
0 commit comments