Task Queues Logic
Task queue management and priority logic.
Priority Management
priority
Attributes
TQ_MIN_SHARE = 0.001
module-attribute
PRIORITY_IGNORED_FIELDS = ('Sites', 'BannedSites')
module-attribute
Classes
Functions
recalculate_tq_shares_for_entity(owner, owner_group, vo, config, task_queue_db)
async
Recalculate the shares for a user/userGroup combo.
Source code in diracx-logic/src/diracx/logic/task_queues/priority.py
set_priorities_for_entity(owner_group, job_share, allow_background_tqs, task_queue_db, owner=None)
async
Set the priority for a user/userGroup combo given a split share.
Source code in diracx-logic/src/diracx/logic/task_queues/priority.py
calculate_priority(tq_dict, all_tqs_data, share, allow_bg_tqs)
async
Calculate the priority for each TQ given a share.
:param tq_dict: dict of {tq_id: prio} :param all_tqs_data: dict of {tq_id: {tq_data}}, where tq_data is a dict of {field: value} :param share: share to be distributed among TQs :param allow_bg_tqs: allow background TQs to be used :return: dict of {priority: [tq_ids]}