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

remove climate strike rule #1318

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: 0 additions & 17 deletions files/galaxy/tpv/tool_defaults.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,23 +60,6 @@ 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: climate_strike
if: True
execute: |
from datetime import datetime
strike_start = datetime(2024,9,20,7,0)
strike_end = datetime(2024,9,20,20,0)
training_roles = (
[role.name for role in user.all_roles()
if not role.deleted and role.name in
("training-bma231-ht24", "training-oubb")]
if user is not None else []
)
now = datetime.now()
if strike_start <= now < strike_end and not training_roles:
entity.params["deferral_time"] = f"{int(strike_end.timestamp())}"
entity.params["deferral_prep_time"] = "60"
entity.params["deferral_window"] = "864000" # 10 days
rank: |
final_destinations = helpers.weighted_random_sampling(candidate_destinations)
final_destinations
Loading