diff --git a/catalog/jobs/discover.py b/catalog/jobs/discover.py index 458bbf5e..2a625ede 100644 --- a/catalog/jobs/discover.py +++ b/catalog/jobs/discover.py @@ -116,14 +116,14 @@ class DiscoverGenerator(BaseJob): "provider_name": str(i.category.label), "history": [ { - "day": int(time.time() / 38600 - 3) * 38600, - "accounts": cnt, - "uses": cnt, + "day": str(int(time.time() / 38400 - 3) * 38400), + "accounts": str(cnt), + "uses": str(cnt), } ], } ) - trends.sort(key=lambda x: x["history"][0]["accounts"], reverse=True) + trends.sort(key=lambda x: int(x["history"][0]["accounts"]), reverse=True) collection_ids = ( Collection.objects.filter(visibility=0) .annotate(num=Count("interactions")) @@ -134,4 +134,6 @@ class DiscoverGenerator(BaseJob): cache.set(cache_key, gallery_list, timeout=None) cache.set("trends_links", trends, timeout=None) cache.set("featured_collections", collection_ids, timeout=None) - logger.info(f"Discover data updated, trends: {len(trends)}.") + logger.info( + f"Discover data updated, trends: {len(trends)}, collections: {len(collection_ids)}." + ) diff --git a/neodb-takahe b/neodb-takahe index a3002178..1522364d 160000 --- a/neodb-takahe +++ b/neodb-takahe @@ -1 +1 @@ -Subproject commit a30021784b52f9d55d33af927145c273f9c49b96 +Subproject commit 1522364d4fd399ba2560656e7e714ee7cea7a905