Pushpull had stale data so we changed the endpoints to use Artic Shift which has fresh data
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -8,7 +8,7 @@ from backend.config import settings
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
BASE_URL = "https://api.pullpush.io"
|
||||
BASE_URL = "https://arctic-shift.photon-reddit.com"
|
||||
|
||||
# Simple in-process rate limiter: track request timestamps
|
||||
_request_times: list[float] = []
|
||||
|
||||
@@ -8,6 +8,8 @@ const ranges = [
|
||||
{ label: '7d', value: '7' },
|
||||
{ label: '30d', value: '30' },
|
||||
{ label: '90d', value: '90' },
|
||||
{ label: '1y', value: '365' },
|
||||
{ label: 'All', value: '3650' },
|
||||
];
|
||||
|
||||
export default function TimeRangeSelector({ value, onChange }: Props) {
|
||||
|
||||
Reference in New Issue
Block a user