mirror of
https://github.com/tropicoo/yt-dlp-bot.git
synced 2024-12-28 10:26:44 +08:00
Fix
This commit is contained in:
parent
8d0d6d2b70
commit
230c893816
3 changed files with 4 additions and 5 deletions
|
@ -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,
|
||||
)
|
||||
|
||||
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue