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