Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: class-central-sync
region: nyc

jobs:
- name: sync
- name: class-central-sync
kind: SCHEDULED
schedule:
cron: '15 * * * *'
Expand All @@ -15,4 +15,4 @@ jobs:

environment_slug: node-js
instance_size_slug: apps-s-1vcpu-2gb
run_command: node ./src/run.js
run_command: pnpm start
5 changes: 3 additions & 2 deletions src/run.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@ import { assertConfig } from './config.js';
// Persist progress every N posts so a killed run keeps its rate-limited work
const CHECKPOINT_EVERY = 25;

// Cap calls to Class Central - the rest roll to the next run
const MAX_POSTS_PER_RUN = 3000;
// Cap calls to Class Central so a run finishes within the platform's job
// timeout instead of being killed mid-loop - the rest roll to the next run
const MAX_POSTS_PER_RUN = 900;

// News shows at most this many courses per post
const MAX_COURSES_PER_POST = 4;
Expand Down