This commit is contained in:
Taras Terletsky 2024-04-28 23:52:58 +03:00
parent 8d0d6d2b70
commit 230c893816
3 changed files with 4 additions and 5 deletions

View file

@ -180,10 +180,9 @@ class AbstractUploadTask(AbstractTask, ABC):
)
async for db in get_db():
await TaskRepository().save_file_cache(
await TaskRepository(session=db).save_file_cache(
cache=cache,
file_id=self._media_object.orm_file_id,
db=db,
)

View file

@ -3,7 +3,7 @@ import logging
from aio_pika import IncomingMessage
from yt_shared.schemas.media import InbMediaPayload
from worker.core.payload_handler import PayloadHandler
from worker.core.payload_handler import InboundPayloadHandler
class RMQCallbacks:
@ -11,7 +11,7 @@ class RMQCallbacks:
def __init__(self) -> None:
self._log = logging.getLogger(self.__class__.__name__)
self._payload_handler = PayloadHandler()
self._payload_handler = InboundPayloadHandler()
async def on_input_message(self, message: IncomingMessage) -> None:
try:

View file

@ -15,7 +15,7 @@ from worker.core.exceptions import DownloadVideoServiceError, GeneralVideoServic
from worker.core.media_service import MediaService
class PayloadHandler:
class InboundPayloadHandler:
def __init__(self) -> None:
self._log = logging.getLogger(self.__class__.__name__)
self._rmq_publisher = RmqPublisher()