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