def CalcPriority(self):
    priorities = [op.priority for op in self.ops
                  if op.status not in constants.OPS_FINALIZED]

    if not priorities:
      # All opcodes are done, assume default priority
      return constants.OP_PRIO_DEFAULT

    return min(priorities)
Gets the current priority for this job.
dataset/ETHPy150Open ganeti/ganeti/lib/jqueue/__init__.py/_QueuedJob.CalcPriority