fix: circular import and internal storage
This commit is contained in:
@@ -2,7 +2,6 @@ from pyrogram import Client
|
||||
from pyrogram.errors import FloodPremiumWait, FloodWait, RPCError
|
||||
|
||||
from userbot.modules.capture.context import CaptureContext
|
||||
from userbot.modules.jobs.repository import enqueue
|
||||
from userbot.modules.stt.service import transcribe_message
|
||||
from utils.logging import logger
|
||||
|
||||
@@ -13,6 +12,8 @@ async def safe_transcribe(
|
||||
try:
|
||||
await transcribe_message(client, ctx, chat_id, message_id)
|
||||
except (FloodWait, FloodPremiumWait):
|
||||
from userbot.modules.jobs.repository import enqueue # noqa: PLC0415
|
||||
|
||||
await enqueue(
|
||||
ctx.pool,
|
||||
ctx.account_id,
|
||||
|
||||
@@ -26,6 +26,7 @@ services:
|
||||
required: false
|
||||
environment:
|
||||
RUN_ENVIRONMENT: prod
|
||||
STORAGE__ROOT: /app/storage
|
||||
volumes:
|
||||
- ./backend/src:/app/src
|
||||
- ./backend/sessions:/app/sessions
|
||||
@@ -45,6 +46,7 @@ services:
|
||||
required: false
|
||||
environment:
|
||||
RUN_ENVIRONMENT: prod
|
||||
STORAGE__ROOT: /app/storage
|
||||
volumes:
|
||||
- ./backend/src:/app/src
|
||||
- ./frontend/build:/app/static:ro
|
||||
|
||||
Reference in New Issue
Block a user