topviewed-removed-queries-fixes
This commit is contained in:
@@ -18,16 +18,11 @@ from services.zine.shoutscache import ShoutsCache
|
||||
|
||||
@mutation.field("incrementView")
|
||||
async def increment_view(_, _info, shout):
|
||||
# TODO: use ackee to collect views
|
||||
async with ViewedStorage.lock:
|
||||
return ViewedStorage.increment(shout)
|
||||
|
||||
|
||||
@query.field("topViewed")
|
||||
async def top_viewed(_, _info, offset, limit):
|
||||
async with ShoutsCache.lock:
|
||||
return ShoutsCache.top_viewed[offset : offset + limit]
|
||||
|
||||
|
||||
@query.field("topMonth")
|
||||
async def top_month(_, _info, offset, limit):
|
||||
async with ShoutsCache.lock:
|
||||
|
Reference in New Issue
Block a user