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)
Evaluate a unary operator on the document.
dataset/ETHPy150Open ganeti/ganeti/lib/jqueue/__init__.py/_QueuedJob.CalcPriority--crossover with--dataset/ETHPy150Open GoogleCloudPlatform/python-compat-runtime/appengine-compat/exported_appengine_sdk/google/appengine/api/search/stub/expression_evaluator.py/ExpressionEvaluator._EvalNumericUnaryOp