feat(backend): add missing types to batch_manager_storage.py

This commit is contained in:
psychedelicious 2023-08-17 13:29:19 +10:00
parent c5b963f1a6
commit 67cf594bb3

View File

@ -157,16 +157,16 @@ class BatchProcessStorageBase(ABC):
def start(
self,
batch_id: str,
):
"""Starts a BatchProcess record by marking its `canceled` attribute to False."""
) -> None:
"""'Starts' a BatchProcess record by marking its `canceled` attribute to False."""
pass
@abstractmethod
def cancel(
self,
batch_id: str,
):
"""Cancel BatchProcess record by setting its `canceled` attribute to True."""
) -> None:
"""'Cancels' a BatchProcess record by setting its `canceled` attribute to True."""
pass
@abstractmethod
@ -396,7 +396,7 @@ class SqliteBatchProcessStorage(BatchProcessStorageBase):
def start(
self,
batch_id: str,
):
) -> None:
try:
self._lock.acquire()
self._cursor.execute(
@ -417,7 +417,7 @@ class SqliteBatchProcessStorage(BatchProcessStorageBase):
def cancel(
self,
batch_id: str,
):
) -> None:
try:
self._lock.acquire()
self._cursor.execute(