imports sort
Some checks failed
Deploy on push / deploy (push) Failing after 9s

This commit is contained in:
2024-08-09 09:37:06 +03:00
parent d0c1f33227
commit 208de158bc
18 changed files with 64 additions and 35 deletions

View File

@@ -1,3 +1,4 @@
from cache.triggers import events_register
from resolvers.author import ( # search_authors,
get_author,
get_author_followers,
@@ -22,24 +23,24 @@ from resolvers.rating import rate_author
from resolvers.reaction import (
create_reaction,
delete_reaction,
load_comment_ratings,
load_reactions_by,
update_reaction,
load_shout_comments,
load_shout_ratings,
load_comment_ratings,
update_reaction,
)
from resolvers.reader import (
get_shout,
load_shouts_by,
load_shouts_coauthored,
load_shouts_discussed,
load_shouts_feed,
load_shouts_followed,
load_shouts_followed_by,
load_shouts_random_top,
load_shouts_random_topic,
load_shouts_search,
load_shouts_unrated,
load_shouts_coauthored,
load_shouts_discussed,
load_shouts_followed,
load_shouts_followed_by,
)
from resolvers.topic import (
get_topic,
@@ -49,7 +50,6 @@ from resolvers.topic import (
get_topics_by_author,
get_topics_by_community,
)
from cache.triggers import events_register
events_register()

View File

@@ -4,6 +4,7 @@ from sqlalchemy import and_, desc, select
from sqlalchemy.orm import joinedload
from sqlalchemy.sql.functions import coalesce
from cache.cache import cache_author, cache_topic
from orm.author import Author
from orm.rating import is_negative, is_positive
from orm.reaction import Reaction, ReactionKind
@@ -12,13 +13,12 @@ from orm.topic import Topic
from resolvers.follower import follow, unfollow
from resolvers.stat import get_with_stat
from services.auth import login_required
from cache.cache import cache_author, cache_topic
from services.db import local_session
from utils.diff import apply_diff, get_diff
from utils.logger import root_logger as logger
from services.notify import notify_shout
from services.schema import mutation, query
from services.search import search_service
from utils.diff import apply_diff, get_diff
from utils.logger import root_logger as logger
async def cache_by_id(entity, entity_id: int, cache_method):

View File

@@ -3,6 +3,12 @@ from typing import List
from sqlalchemy import select
from sqlalchemy.sql import and_
from cache.cache import (
cache_author,
cache_topic,
get_cached_follower_authors,
get_cached_follower_topics,
)
from orm.author import Author, AuthorFollower
from orm.community import Community, CommunityFollower
from orm.reaction import Reaction
@@ -10,7 +16,6 @@ from orm.shout import Shout, ShoutReactionsFollower
from orm.topic import Topic, TopicFollower
from resolvers.stat import get_with_stat
from services.auth import login_required
from cache.cache import cache_author, cache_topic, get_cached_follower_authors, get_cached_follower_topics
from services.db import local_session
from services.notify import notify_follower
from services.schema import mutation, query

View File

@@ -8,12 +8,17 @@ from sqlalchemy.orm import aliased
from sqlalchemy.sql import not_
from orm.author import Author
from orm.notification import Notification, NotificationAction, NotificationEntity, NotificationSeen
from orm.notification import (
Notification,
NotificationAction,
NotificationEntity,
NotificationSeen,
)
from orm.shout import Shout
from services.auth import login_required
from services.db import local_session
from utils.logger import root_logger as logger
from services.schema import mutation, query
from utils.logger import root_logger as logger
def query_notifications(author_id: int, after: int = 0) -> Tuple[int, int, List[Tuple[Notification, bool]]]:

View File

@@ -1,5 +1,6 @@
from typing import List
from sqlalchemy.orm import aliased, selectinload, joinedload
from sqlalchemy.orm import aliased, joinedload, selectinload
from sqlalchemy.sql import union
from sqlalchemy.sql.expression import (
and_,
@@ -12,17 +13,18 @@ from sqlalchemy.sql.expression import (
select,
text,
)
from orm.author import Author, AuthorFollower
from orm.reaction import Reaction, ReactionKind
from orm.shout import Shout, ShoutAuthor, ShoutTopic, ShoutReactionsFollower
from orm.shout import Shout, ShoutAuthor, ShoutReactionsFollower, ShoutTopic
from orm.topic import Topic, TopicFollower
from resolvers.topic import get_topics_random
from services.auth import login_required
from services.db import local_session
from utils.logger import root_logger as logger
from services.schema import query
from services.search import search_text
from services.viewed import ViewedStorage
from utils.logger import root_logger as logger
def query_shouts(slug=None):