Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change glideclient advertisement logic #484

Merged
merged 1 commit into from
Dec 14, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading