Declare LoopState beside decode_state, as the state a reload carries
This commit was merged in pull request #130.
This commit is contained in:
@@ -9,6 +9,14 @@ import typing
|
||||
RELOAD_FLAG = "--reloaded"
|
||||
|
||||
|
||||
# A field change stops a running loop at its next reload: the new script rejects the old fields.
|
||||
@dataclasses.dataclass(frozen=True)
|
||||
class LoopState:
|
||||
cycle_number: int
|
||||
root: str
|
||||
task: str
|
||||
|
||||
|
||||
def decode_state(handed, kind):
|
||||
try:
|
||||
fields = json.loads(handed)
|
||||
|
||||
Reference in New Issue
Block a user