mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-02-20 20:09:11 +00:00
fw/signal: use enum to define priorities
Use an enum rather than a random class to define the priority levels for the signals.
This commit is contained in:
parent
e015f438ae
commit
d79e8324f0
@ -26,7 +26,7 @@ from contextlib import contextmanager
|
||||
import wrapt
|
||||
from louie import dispatcher
|
||||
|
||||
from wa.utils.types import prioritylist
|
||||
from wa.utils.types import prioritylist, enum
|
||||
|
||||
|
||||
logger = logging.getLogger('signal')
|
||||
@ -193,18 +193,10 @@ AFTER_OVERALL_RESULTS_PROCESSING = Signal(
|
||||
'after-overall-results-process')
|
||||
|
||||
|
||||
class CallbackPriority(object):
|
||||
|
||||
EXTREMELY_HIGH = 30
|
||||
VERY_HIGH = 20
|
||||
HIGH = 10
|
||||
NORMAL = 0
|
||||
LOW = -10
|
||||
VERY_LOW = -20
|
||||
EXTREMELY_LOW = -30
|
||||
|
||||
def __init__(self):
|
||||
raise ValueError('Cannot instantiate')
|
||||
CallbackPriority = enum(['extremely_low', 'very_low', 'low', 'normal',
|
||||
'high', 'very_high', 'extremely_high'], -30, 10)
|
||||
|
||||
|
||||
class _prioritylist_wrapper(prioritylist):
|
||||
|
Loading…
x
Reference in New Issue
Block a user