Skip to content
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
7 changes: 6 additions & 1 deletion opensciencegrid/ospool-cm/opt/ospool/update-prios
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
# modified according to attributes such as the number of held jobs and the
# ratio of goodput to badput.

import os
import re
import sys

Expand All @@ -31,6 +32,7 @@ def step(n):

def main():
col = htcondor.Collector()
ext_hostname = os.environ.get("OSPOOL_EXT_HOSTNAME")

# find the right negotiator
neg_ad = None
Expand All @@ -41,6 +43,9 @@ def main():
if not neg_ad:
print("Unable to find the main negotiator")
sys.exit(1)
if ext_hostname not in neg_ad['Name']:
print(f"Not updating as the negotiator is running on {neg_ad['Name']}")
sys.exit(2)
neg = htcondor.Negotiator(neg_ad)
print(f"Updating negotiator {neg_ad['Name']}")

Expand All @@ -63,7 +68,7 @@ def main():
factor += held

if "daniel.morales" in ad["Name"]:
factor -= 700
factor -= 1500

# upper/lower limits on the adjustments
factor = min(factor, 10000)
Expand Down
Loading