constant_weight_prioritization#

scheduler.prioritization.constant_weight_prioritization(time_delta: float, job: Job, max_exec: int, job_count: int) float[source]#

Interprets the Job’s weight as its priority.

Return the Job’s weight for overdue Jobs, otherwise return zero:

\left(\mathtt{time\_delta},\mathtt{weight}\right)\ {\mapsto}\begin{cases} 0 & :\ \mathtt{time\_delta}<0\\ \mathtt{weight} & :\ \mathtt{time\_delta}\geq0 \end{cases}

Parameters:
time_deltafloat

The time in seconds that a Job is overdue.

jobJob

The Job instance

max_execint

Limits the number of overdue Jobs that can be executed by calling function Scheduler.exec_jobs().

job_countint

Number of scheduled Jobs

Returns:
float

The weight of a Job as priority.