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

TPV rule to send jobs to the secondary HTCondor cluster #1010

Merged
merged 1 commit into from
Nov 23, 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
17 changes: 17 additions & 0 deletions files/galaxy/tpv/tool_defaults.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,23 @@
retval
fail: |
Invalid 'Remote resources id' selected in the config menu under 'User -> Preferences -> Manage Information -> Use distributed compute resources'. Please reselect either 'default' or an appropriate remote resource then click 'Save' and rerun your job.
- id: secondary_cluster
# Send a fraction of jobs to the secondary HTCondor cluster.
if: True

Check warning on line 65 in files/galaxy/tpv/tool_defaults.yml

View workflow job for this annotation

GitHub Actions / Lint

65:13 [truthy] truthy value should be one of [false, true]
execute: |
from random import SystemRandom

from tpv.core.entities import Tag, TagSetManager, TagType

if SystemRandom().random() < 0.05:
pulsar_tag = Tag(
"scheduling",
"condor-secondary",
TagType.REQUIRE,
)
entity.tpv_tags = entity.tpv_tags.combine(
TagSetManager(tags=[pulsar_tag])
)

rank: |
final_destinations = helpers.weighted_random_sampling(candidate_destinations)
Expand Down
Loading