Pushpull had stale data so we changed the endpoints to use Artic Shift which has fresh data

This commit is contained in:
2026-03-10 08:05:44 -05:00
parent 98da601540
commit 5bd9a1649c
3 changed files with 16 additions and 17 deletions

View File

@@ -129,11 +129,10 @@ async def _poll_new_posts_async():
client = create_client()
async with client:
for sub in subreddits:
data = await fetch_json(client, "/reddit/search/submission/", {
data = await fetch_json(client, "/api/posts/search", {
"subreddit": sub["name"],
"sort": "created_utc",
"sort_type": "desc",
"size": 100,
"sort": "desc",
"limit": 100,
})
if not data:
continue
@@ -163,11 +162,11 @@ async def _poll_hot_posts_async():
client = create_client()
async with client:
for sub in subreddits:
data = await fetch_json(client, "/reddit/search/submission/", {
data = await fetch_json(client, "/api/posts/search", {
"subreddit": sub["name"],
"sort": "score",
"sort_type": "desc",
"size": 100,
"sort": "desc",
"sort_by": "score",
"limit": 100,
"after": after_epoch,
})
if not data:
@@ -201,11 +200,10 @@ async def _collect_comments_async():
client = create_client()
async with client:
for sub in subreddits:
data = await fetch_json(client, "/reddit/search/comment/", {
data = await fetch_json(client, "/api/comments/search", {
"subreddit": sub["name"],
"sort": "created_utc",
"sort_type": "desc",
"size": 100,
"sort": "desc",
"limit": 100,
"after": cutoff_epoch,
})
if not data:
@@ -273,11 +271,10 @@ async def _update_scores_async():
client = create_client()
async with client:
for sub in subreddits:
data = await fetch_json(client, "/reddit/search/submission/", {
data = await fetch_json(client, "/api/posts/search", {
"subreddit": sub["name"],
"sort": "created_utc",
"sort_type": "desc",
"size": 100,
"sort": "desc",
"limit": 100,
"after": after_epoch,
})
if not data: