pyfarm.models.jobqueue module¶
Job Queue Model¶
Model for job queues
-
class
pyfarm.models.jobqueue.
JobQueue
(**kwargs)[source]¶ Bases:
flask_sqlalchemy.Model
,pyfarm.models.core.mixins.UtilityMixins
,pyfarm.models.core.mixins.ReprMixin
Stores information about a job queue. Used for flexible, configurable distribution of computing capacity to jobs.
-
REPR_COLUMNS
= ('id', 'name')¶
-
child_queues_sorted
()[source]¶ Return child queues sorted by number of currently assigned agents with priority as a secondary sort key.
-
children
¶
-
fullpath
¶ The path of this jobqueue. This column is a database denormalization. It is technically redundant, but faster to access than recursively querying all parent queues. If set to NULL, the path must be computed by recursively querying the parent queues.
-
id
¶ Provides an id for the current row. This value should never be directly relied upon and it’s intended for use by relationships.
-
jobs
¶
-
maximum_agents
¶ The scheduler will never assign more than this number of agents to jobs in or below this queue.
-
minimum_agents
¶ The scheduler will try to assign at least this number of agents to jobs in or below this queue as long as it can use them, before any other considerations.
-
name
¶ The name of the job queue
-
parent
¶ Relationship between this queue its parent
-
parent_jobqueue_id
¶ The parent queue of this queue. If NULL, this is a top level queue.
-
priority
¶ The priority of this job queue. The scheduler will not assign any nodes to other job queues or jobs with the same parent and a lower priority as long as this one can still use nodes. The minimum_agents column takes precedence over this.
-
weight
¶ The weight of this job queue. The scheduler will distribute available agents between jobs and job queues in the same queue in proportion to their weights.
-