chore(backend,infra): resolve template update conflicts, import check knows the watcher and the api login
This commit is contained in:
1 parent
5fb8f8a534
commit
56146e4e8d
27 files changed
+27
-82
No files matched your search
@@ -9,7 +9,7 @@ from pyrogram.errors import AuthTokenExpired, SessionPasswordNeeded
|
||||
from pyrogram.qrlogin import QRLogin
|
||||
from pyrogram.types import User
|
||||
|
||||
from userbot import PyroClient
|
||||
from userbot.modules.client import PyroClient
|
||||
from utils.env import env
|
||||
|
||||
LOGIN_TTL_SECONDS = 900
|
||||
|
||||
@@ -9,7 +9,7 @@ from pyrogram.errors import FloodWait, RPCError
|
||||
from pyrogram.types import User
|
||||
|
||||
from api.login import LoginError, login_manager
|
||||
from userbot import DEVICE_MODEL_LIMIT
|
||||
from userbot.modules.client import DEVICE_MODEL_LIMIT
|
||||
from utils.read import accounts
|
||||
from utils.read.models import AccountView
|
||||
|
||||
|
||||
@@ -3,8 +3,4 @@ from dishka import make_async_container
|
||||
from dependencies.providers.postgres import DbProvider
|
||||
from dependencies.providers.storage import StorageProvider
|
||||
|
||||
<<<<<<< before updating
|
||||
container = make_async_container(DbProvider(), StorageProvider())
|
||||
=======
|
||||
container = make_async_container(DbProvider(), RepositoryProvider())
|
||||
>>>>>>> after updating
|
||||
@@ -1,6 +0,0 @@
|
||||
<<<<<<< before updating
|
||||
from userbot.modules.client import DEVICE_MODEL, DEVICE_MODEL_LIMIT, PyroClient
|
||||
|
||||
__all__ = ["DEVICE_MODEL", "DEVICE_MODEL_LIMIT", "PyroClient"]
|
||||
=======
|
||||
>>>>>>> after updating
|
||||
@@ -1,8 +1,8 @@
|
||||
from pyrogram.types import Message
|
||||
|
||||
from userbot import PyroClient
|
||||
from userbot.modules.capture import repository
|
||||
from userbot.modules.capture.repository import CHANNEL_ID_THRESHOLD
|
||||
from userbot.modules.client import PyroClient
|
||||
from utils.events import notify_bg_event
|
||||
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
from pyrogram.types import Message
|
||||
|
||||
from userbot import PyroClient
|
||||
from userbot.modules.capture import repository
|
||||
from userbot.modules.capture.chat_meta import meta_from_chat
|
||||
from userbot.modules.capture.message import sender_id
|
||||
from userbot.modules.client import PyroClient
|
||||
from userbot.modules.media import capture_media, media_unique_id, self_destruct_ttl
|
||||
from userbot.modules.raw_json import raw_json
|
||||
from utils.events import notify_bg_event
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
from pyrogram.types import Message
|
||||
|
||||
from userbot import PyroClient
|
||||
from userbot.modules.capture import capture_message
|
||||
from userbot.modules.capture.chat_meta import meta_from_chat
|
||||
from userbot.modules.client import PyroClient
|
||||
from userbot.modules.stt import is_transcribable
|
||||
from userbot.modules.stt.gate import safe_transcribe
|
||||
from utils.events import notify_bg_event
|
||||
|
||||
@@ -2,7 +2,7 @@ from datetime import UTC, datetime
|
||||
|
||||
from pyrogram.types import User
|
||||
|
||||
from userbot import PyroClient
|
||||
from userbot.modules.client import PyroClient
|
||||
from userbot.modules.presence import repository
|
||||
from userbot.modules.raw_json import raw_json
|
||||
from utils.events import notify_bg_event
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
from pyrogram import raw
|
||||
|
||||
from userbot import PyroClient
|
||||
from userbot.modules.client import PyroClient
|
||||
|
||||
HANDLES = (raw.types.UpdateContactsReset, raw.types.UpdateUser)
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
from pyrogram import raw
|
||||
|
||||
from userbot import PyroClient
|
||||
from userbot.modules.client import PyroClient
|
||||
|
||||
HANDLES = (
|
||||
raw.types.UpdateDialogFilter,
|
||||
|
||||
@@ -2,7 +2,6 @@ from collections.abc import Awaitable, Callable
|
||||
|
||||
from pyrogram import raw
|
||||
|
||||
from userbot import PyroClient
|
||||
from userbot.handlers.raw import (
|
||||
contacts,
|
||||
dialog_filters,
|
||||
@@ -12,6 +11,7 @@ from userbot.handlers.raw import (
|
||||
read_receipts,
|
||||
transcribed,
|
||||
)
|
||||
from userbot.modules.client import PyroClient
|
||||
|
||||
RawHandler = Callable[..., Awaitable[None]]
|
||||
|
||||
|
||||
@@ -2,8 +2,8 @@ from dataclasses import replace
|
||||
|
||||
from pyrogram import raw
|
||||
|
||||
from userbot import PyroClient
|
||||
from userbot.modules.avatars import capture_avatar
|
||||
from userbot.modules.client import PyroClient
|
||||
from userbot.modules.profiles import active_username, snapshot_from_user
|
||||
from userbot.modules.profiles.parse import ProfileFields
|
||||
from userbot.modules.profiles.repository import get_peer, write_profile
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
from pyrogram import raw, utils
|
||||
|
||||
from userbot import PyroClient
|
||||
from userbot.modules.capture import repository
|
||||
from userbot.modules.capture.chat_meta import meta_from_peer
|
||||
from userbot.modules.client import PyroClient
|
||||
from utils.events import notify_bg_event
|
||||
|
||||
HANDLES = (raw.types.UpdateMessageReactions,)
|
||||
|
||||
@@ -2,8 +2,8 @@ from datetime import UTC, datetime
|
||||
|
||||
from pyrogram import raw, utils
|
||||
|
||||
from userbot import PyroClient
|
||||
from userbot.modules.capture.chat_meta import meta_from_chat_id
|
||||
from userbot.modules.client import PyroClient
|
||||
from userbot.modules.raw_json import raw_json
|
||||
from userbot.modules.read_receipts import repository as receipts
|
||||
from userbot.modules.stt import repository
|
||||
|
||||
@@ -2,7 +2,7 @@ from datetime import UTC, datetime
|
||||
|
||||
from pyrogram import raw, utils
|
||||
|
||||
from userbot import PyroClient
|
||||
from userbot.modules.client import PyroClient
|
||||
from userbot.modules.raw_json import raw_json
|
||||
from userbot.modules.read_receipts import repository
|
||||
from utils.events import notify_bg_event
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
from pyrogram import raw
|
||||
|
||||
from userbot import PyroClient
|
||||
from userbot.modules.capture.chat_meta import meta_from_peer
|
||||
from userbot.modules.client import PyroClient
|
||||
from userbot.modules.stt import repository
|
||||
|
||||
HANDLES = (raw.types.UpdateTranscribedAudio,)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
from pyrogram.types import Story
|
||||
|
||||
from userbot import PyroClient
|
||||
from userbot.modules.client import PyroClient
|
||||
from userbot.modules.stories.service import save_story
|
||||
|
||||
|
||||
|
||||
@@ -10,8 +10,8 @@ import asyncpg
|
||||
import uvloop
|
||||
|
||||
from dependencies.container import container
|
||||
from userbot import PyroClient
|
||||
from userbot.modules.capture import CaptureContext, build_capture_context
|
||||
from userbot.modules.client import PyroClient
|
||||
from userbot.modules.jobs import JobConsumer
|
||||
from utils.env import env
|
||||
from utils.jobs import enqueue
|
||||
|
||||
@@ -4,27 +4,7 @@ from pydantic import Field, SecretStr
|
||||
from pydantic_settings import BaseSettings, SettingsConfigDict
|
||||
|
||||
|
||||
<<<<<<< before updating
|
||||
class DatabaseSettings(BaseSettings):
|
||||
=======
|
||||
def is_prod() -> bool:
|
||||
return os.getenv("RUN_ENVIRONMENT") == "prod"
|
||||
|
||||
|
||||
class Section(BaseSettings):
|
||||
model_config = SettingsConfigDict(extra="ignore")
|
||||
|
||||
|
||||
class LogSettings(Section):
|
||||
level: str = "INFO"
|
||||
level_external: str = "WARNING"
|
||||
show_time: bool = False
|
||||
show_locals: bool = False
|
||||
console_width: int = 150
|
||||
|
||||
|
||||
class DatabaseSettings(Section):
|
||||
>>>>>>> after updating
|
||||
host: str = "postgres"
|
||||
port: int = 5432
|
||||
user: str = "beavergram"
|
||||
@@ -76,6 +56,7 @@ class LogSettings(BaseSettings):
|
||||
level: str = "INFO"
|
||||
level_external: str = "WARNING"
|
||||
show_time: bool = False
|
||||
show_locals: bool = False
|
||||
console_width: int = 150
|
||||
|
||||
|
||||
|
||||
@@ -13,10 +13,10 @@ from dataclasses import dataclass
|
||||
from pyrogram import raw, types
|
||||
from pyrogram.errors import RPCError
|
||||
|
||||
from userbot import PyroClient
|
||||
from userbot.modules.capture import capture_message
|
||||
from userbot.modules.capture.chat_meta import meta_from_chat
|
||||
from userbot.modules.capture.context import CaptureContext
|
||||
from userbot.modules.client import PyroClient
|
||||
from utils.logging import logger
|
||||
|
||||
EARLIEST_PTS = 1
|
||||
|
||||
@@ -11,9 +11,9 @@ from pyrogram.handlers import (
|
||||
MessageHandler,
|
||||
)
|
||||
|
||||
from userbot import PyroClient
|
||||
from userbot.modules.capture import capture_message
|
||||
from userbot.modules.capture.chat_meta import meta_from_chat
|
||||
from userbot.modules.client import PyroClient
|
||||
from userbot.modules.jobs import JobConsumer
|
||||
from utils.events import notify_bg_event
|
||||
from utils.jobs import enqueue
|
||||
|
||||
Reference in new issue
Block a user