Skip to content

Commit

Permalink
hard-code high priority users
Browse files Browse the repository at this point in the history
  • Loading branch information
francesconazzaro committed Oct 4, 2024
1 parent 74da888 commit 2906793
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
1 change: 0 additions & 1 deletion cads_broker/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@


class BrokerConfig(pydantic_settings.BaseSettings):
high_priority_user_uid: str = "8d8ee054-6a09-4da8-a5be-d5dff52bbc5f"
broker_priority_algorithm: str = "legacy"
broker_priority_interval_hours: int = 24
broker_get_number_of_workers_cache_time: int = 10
Expand Down
8 changes: 7 additions & 1 deletion cads_broker/dispatcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -604,8 +604,14 @@ def processing_time_priority_algorithm(
user_requests.setdefault(request.user_uid, []).append(request)
# FIXME: this is a temporary solution to prioritize subrequests from the high priority user
interval_stop = datetime.datetime.now()
# temporary solution to prioritize high priority user
users_queue = {
CONFIG.high_priority_user_uid: 0
"27888ffa-0973-4794-9b3c-9efb6767f66f": 0, # wekeo
"d67a13db-86cc-439d-823d-6517003de29f": 0, # CDS Apps user
"365ac1da-090e-4b85-9088-30c676bc5251": 0, # Gionata
"74c6f9a1-8efe-4a6c-b06b-9f8ddcab188d": 0, # User Support
"4d92cc89-d586-4731-8553-07df5dae1886": 0, # Luke Jones
"8d8ee054-6a09-4da8-a5be-d5dff52bbc5f": 0, # Petrut
} | db.get_users_queue_from_processing_time(
interval_stop=interval_stop,
session=session_write,
Expand Down

0 comments on commit 2906793

Please sign in to comment.