backend api 추가
This commit is contained in:
1 parent
2d4201ce9e
commit
f008ed4010
15 files changed
+1501
-5
No files matched your search
@@ -5,6 +5,21 @@
|
||||
from enum import StrEnum
|
||||
|
||||
|
||||
def stage_keys(state_type) -> list[str]:
|
||||
"""실행 순서대로 나열된 단계 이름
|
||||
COMPLETED는 종료 표시라 빠짐
|
||||
"""
|
||||
return [member.value for member in state_type if member.name != "COMPLETED"]
|
||||
|
||||
|
||||
def initial_timings(state_type) -> dict:
|
||||
"""스테퍼가 그리는 단계별 시각의 초기값
|
||||
키 순서가 곧 화면에 찍히는 순서라 생성 시점에 다 채워 둔다
|
||||
"""
|
||||
return {key: {"status": "idle", "started": None, "ended": None}
|
||||
for key in stage_keys(state_type)}
|
||||
|
||||
|
||||
class PosterAliveState(StrEnum):
|
||||
DETECT = "detect"
|
||||
NARRATION_TEXT = "narration_text"
|
||||
|
||||
Reference in new issue
Block a user