Compare commits
No commits in common. "a0f4ef93894dbeacc89eedebe30008070acea183" and "5a5f307c33ca43fbcf3acc13d9d46db6bfd07b69" have entirely different histories.
a0f4ef9389
...
5a5f307c33
|
@ -1,11 +1,11 @@
|
|||
from flask import Flask
|
||||
|
||||
from config import config
|
||||
from config import Config
|
||||
from app.blueprints import blueprints
|
||||
from app.extensions import db, migrate
|
||||
from app.celery import celery_init_app
|
||||
|
||||
def create_app(config_class=config):
|
||||
def create_app(config_class=Config):
|
||||
app = Flask(__name__)
|
||||
app.config.from_object(config_class)
|
||||
|
||||
|
|
14
config.py
14
config.py
|
@ -2,8 +2,8 @@ import os
|
|||
|
||||
basedir = os.path.abspath(os.path.dirname(__file__))
|
||||
|
||||
|
||||
class ProductionConfig:
|
||||
class Config:
|
||||
SECRET_KEY = os.environ.get('SECRET_KEY')
|
||||
SQLALCHEMY_DATABASE_URI = f"postgresql://{os.environ.get('POSTGRES_USER')}:{os.environ.get('POSTGRES_PASSWORD')}@postgres/{os.environ.get('POSTGRES_DB')}"
|
||||
SQLALCHEMY_TRACK_MODIFICATIONS = False
|
||||
CELERY = dict(
|
||||
|
@ -12,13 +12,3 @@ class ProductionConfig:
|
|||
task_ignore_result=True,
|
||||
)
|
||||
|
||||
class DebugConfig:
|
||||
SQLALCHEMY_DATABASE_URI = f"postgresql://postgres:123456789@localhost:5432/paper"
|
||||
SQLALCHEMY_TRACK_MODIFICATIONS = False
|
||||
CELERY = dict(
|
||||
broker_url="redis://localhost:6379/0",
|
||||
result_backend="redis://localhost:6379/0",
|
||||
task_ignore_result=True,
|
||||
)
|
||||
|
||||
config = DebugConfig
|
|
@ -28,7 +28,7 @@ from telethon.errors.rpcerrorlist import (
|
|||
|
||||
class PaperClient(TelegramClient):
|
||||
def __init__(self, session: str | Session) -> None:
|
||||
api = API.TelegramDesktop.Generate("linux", "paper")
|
||||
api = API.TelegramAndroid.Generate("paper")
|
||||
super().__init__(session, api)
|
||||
|
||||
async def invite_self(self, group: Entity | EntityLike):
|
||||
|
|
Loading…
Reference in New Issue