precommit
All checks were successful
Deploy on push / deploy (push) Successful in 49s

This commit is contained in:
2024-04-08 10:38:58 +03:00
parent df15e63dde
commit c301256751
24 changed files with 92 additions and 188 deletions

View File

@@ -1,4 +1,5 @@
from functools import wraps
import httpx
from starlette.exceptions import HTTPException

View File

@@ -1,17 +1,16 @@
import asyncio
from sqlalchemy import select, event
import json
from sqlalchemy import event, select
from orm.author import Author, AuthorFollower
from orm.reaction import Reaction
from orm.shout import ShoutAuthor, Shout
from orm.shout import Shout, ShoutAuthor
from orm.topic import Topic, TopicFollower
from resolvers.stat import get_with_stat
from services.encoders import CustomJSONEncoder
from services.rediscache import redis
from services.logger import root_logger as logger
from services.rediscache import redis
DEFAULT_FOLLOWS = {
'topics': [],

View File

@@ -1,10 +1,12 @@
import json
import math
import time
import traceback
import warnings
from typing import Any, Callable, Dict, TypeVar
from sqlalchemy import exc, event, Engine
from sqlalchemy import inspect, Column, Integer, create_engine, JSON
from sqlalchemy import (JSON, Column, Engine, Integer, create_engine, event,
exc, inspect)
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import Session, configure_mappers
from sqlalchemy.sql.schema import Table
@@ -12,8 +14,6 @@ from sqlalchemy_searchable import make_searchable
from services.logger import root_logger as logger
from settings import DB_URL
import warnings
import traceback
# Подключение к базе данных SQLAlchemy
engine = create_engine(DB_URL, echo=False, pool_size=10, max_overflow=20)

View File

@@ -1,4 +1,5 @@
import logging
import colorlog
# Define the color scheme

View File

@@ -1,9 +1,9 @@
import logging
import redis.asyncio as aredis
import logging
from settings import REDIS_URL
# Set redis logging level to suppress DEBUG messages
logger = logging.getLogger('redis')
logger.setLevel(logging.WARNING)

View File

@@ -7,12 +7,8 @@ from typing import Dict
# ga
from google.analytics.data_v1beta import BetaAnalyticsDataClient
from google.analytics.data_v1beta.types import (
DateRange,
Dimension,
Metric,
RunReportRequest,
)
from google.analytics.data_v1beta.types import (DateRange, Dimension, Metric,
RunReportRequest)
from orm.author import Author
from orm.shout import Shout, ShoutAuthor, ShoutTopic

View File

@@ -2,9 +2,9 @@ import os
import re
from starlette.endpoints import HTTPEndpoint
from starlette.exceptions import HTTPException
from starlette.requests import Request
from starlette.responses import JSONResponse
from starlette.exceptions import HTTPException
from orm.author import Author
from services.db import local_session