Skip to content

Commit

Permalink
Fix glideclient advertisement logic
Browse files Browse the repository at this point in the history
  • Loading branch information
BrunoCoimbra authored and mambelli committed Dec 14, 2023
1 parent 9c1f8e5 commit cb19a5b
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions src/decisionengine_modules/glideinwms/glide_frontend_element.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,12 @@ def generate_glidein_requests(self, jobs_df, slots_df, entries, factory_globals,
########################################################################

# List of glideids that have idle jobs
glideids_with_idle_jobs = job_types["Idle"]["count"].keys()
glideids_to_advertise = set(job_types["Idle"]["count"].keys())

# List of glideids that have active slots
for glideid in self.glideid_list:
if self.count_entry_slots[glideid[1]]["Total"] > 0:
glideids_to_advertise.add(glideid)

# For faster lookup
self.processed_glideid_strs = []
Expand All @@ -166,7 +171,7 @@ def generate_glidein_requests(self, jobs_df, slots_df, entries, factory_globals,

# Get the FOM info and generate requests based on the FOM

for glideid in glideids_with_idle_jobs:
for glideid in glideids_to_advertise:
if glideid == (None, None):
# Ignore the unmatched entries
continue
Expand Down Expand Up @@ -1500,7 +1505,12 @@ def generate_glidein_requests_one(self, jobs_df, slots_df, entries, factory_glob
########################################################################

# List of glideids that have idle jobs
glideids_with_idle_jobs = job_types["Idle"]["count"].keys()
glideids_to_advertise = set(job_types["Idle"]["count"].keys())

# List of glideids that have active slots
for glideid in self.glideid_list:
if self.count_entry_slots[glideid[1]]["Total"] > 0:
glideids_to_advertise.add(glideid)

# For faster lookup
self.processed_glideid_strs = []
Expand All @@ -1509,7 +1519,7 @@ def generate_glidein_requests_one(self, jobs_df, slots_df, entries, factory_glob
total_up_stats_arr = init_factory_stats_arr()
total_down_stats_arr = init_factory_stats_arr()

for glideid in glideids_with_idle_jobs:
for glideid in glideids_to_advertize:
if glideid == (None, None):
# Ignore the unmatched entries
continue
Expand Down

0 comments on commit cb19a5b

Please sign in to comment.