look here!
This commit is contained in:
parent
121d57500c
commit
5297c99fdb
|
@ -20,11 +20,11 @@ class GitTask:
|
||||||
queue = asyncio.Queue()
|
queue = asyncio.Queue()
|
||||||
|
|
||||||
def __init__(self, input, username, user_email, comment):
|
def __init__(self, input, username, user_email, comment):
|
||||||
self.slug = input["slug"];
|
self.slug = input["slug"]
|
||||||
self.shout_body = input["body"];
|
self.shout_body = input["body"]
|
||||||
self.username = username;
|
self.username = username
|
||||||
self.user_email = user_email;
|
self.user_email = user_email
|
||||||
self.comment = comment;
|
self.comment = comment
|
||||||
|
|
||||||
GitTask.queue.put_nowait(self)
|
GitTask.queue.put_nowait(self)
|
||||||
|
|
||||||
|
@ -99,9 +99,9 @@ class TopShouts:
|
||||||
month_ago = datetime.now() - timedelta(days = 30)
|
month_ago = datetime.now() - timedelta(days = 30)
|
||||||
with local_session() as session:
|
with local_session() as session:
|
||||||
stmt = select(\
|
stmt = select(\
|
||||||
Shout,\
|
Shout,\
|
||||||
func.sum(ShoutViewByDay.value).label("view"),\
|
func.sum(ShoutViewByDay.value).label("view"),\
|
||||||
func.sum(ShoutRating.value).label("rating")\
|
func.sum(ShoutRating.value).label("rating")\
|
||||||
).\
|
).\
|
||||||
join(ShoutViewByDay).\
|
join(ShoutViewByDay).\
|
||||||
join(ShoutRating).\
|
join(ShoutRating).\
|
||||||
|
|
Loading…
Reference in New Issue
Block a user