Skip to content

Commit

Permalink
Merge pull request #1010 from kysrpex/htcondor-secondary_tpv_rule
Browse files Browse the repository at this point in the history
TPV rule to send jobs to the secondary HTCondor cluster
  • Loading branch information
kysrpex authored Nov 23, 2023
2 parents 1b52fdd + a4c5466 commit 5542805
Showing 1 changed file with 17 additions and 0 deletions.
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 @@ tools:
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

0 comments on commit 5542805

Please sign in to comment.