mstar.engine.resources.admission#
Admission across the resources of one runner, see Resource.ask.
Classes
|
The queues of the resources that ask, and the nodes each request was admitted on. |
- class mstar.engine.resources.admission.Admission(resources, ask_order)[source]#
Bases:
objectThe queues of the resources that ask, and the nodes each request was admitted on.
A waiting request is admitted once it is first in every queue it is in and each resource it asked reserves for it, all or nothing.
- admit(rid, node_name, graph_walk, published, keys)[source]#
None once
ridis admitted onnode_name, else why it waits or fails.keysare the resources ofnode_namethat ask.- Parameters:
rid (str)
node_name (str)
graph_walk (str)
published (Mapping[str, PublishedInfo] | None)
keys (Collection[str])
- Return type:
FullAdmitOutcome | None
- admit_waiting(published_of)[source]#
Admit each waiting request that is now first in every queue it is in and fits, and return the (node, rid) pairs that may start.
published_of(rid, node)gives what the request published for that node’s resources.Nothing is tried until a resource whose first waiting request didn’t fit has grown, or a queue has a new first request, so a pass that changed neither costs one Resource.grew_since for each such resource.