mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-04-15 23:30:47 +01: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
|
import wrapt
|
||||||
from louie import dispatcher
|
from louie import dispatcher
|
||||||
|
|
||||||
from wa.utils.types import prioritylist
|
from wa.utils.types import prioritylist, enum
|
||||||
|
|
||||||
|
|
||||||
logger = logging.getLogger('signal')
|
logger = logging.getLogger('signal')
|
||||||
@ -193,18 +193,10 @@ AFTER_OVERALL_RESULTS_PROCESSING = Signal(
|
|||||||
'after-overall-results-process')
|
'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):
|
CallbackPriority = enum(['extremely_low', 'very_low', 'low', 'normal',
|
||||||
raise ValueError('Cannot instantiate')
|
'high', 'very_high', 'extremely_high'], -30, 10)
|
||||||
|
|
||||||
|
|
||||||
class _prioritylist_wrapper(prioritylist):
|
class _prioritylist_wrapper(prioritylist):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user