diff --git a/videodb/_constants.py b/videodb/_constants.py index c16eab6..cdfcb5c 100644 --- a/videodb/_constants.py +++ b/videodb/_constants.py @@ -147,6 +147,11 @@ class Status: in_progress = "in progress" +INDEX_TERMINAL_STATUSES = {"ready", "failed"} +UNDERSTANDING_TERMINAL_STATUSES = {"done", "failed"} +ANALYZER_TERMINAL_STATUSES = {"done", "failed", "skipped", "cancelled"} + + class MeetingStatus: initializing = "initializing" processing = "processing" diff --git a/videodb/index.py b/videodb/index.py index 731bb04..9c2d93b 100644 --- a/videodb/index.py +++ b/videodb/index.py @@ -2,10 +2,7 @@ from typing import List, Optional -from videodb._constants import ApiPath - - -INDEX_TERMINAL_STATUSES = {"ready", "failed"} +from videodb._constants import ApiPath, INDEX_TERMINAL_STATUSES class FieldSchema: diff --git a/videodb/understanding.py b/videodb/understanding.py index 150e071..208c4f0 100644 --- a/videodb/understanding.py +++ b/videodb/understanding.py @@ -1,12 +1,13 @@ import time from typing import Any, Dict, List, Optional -from videodb._constants import ApiPath +from videodb._constants import ( + ApiPath, + ANALYZER_TERMINAL_STATUSES, + UNDERSTANDING_TERMINAL_STATUSES, +) -UNDERSTANDING_TERMINAL_STATUSES = {"done", "failed"} -ANALYZER_TERMINAL_STATUSES = {"done", "failed", "skipped", "cancelled"} - ANALYZER_TYPE_ALIASES = { "spoken_words": "speech_transcription", }