Move RATE_LIMIT_COOLDOWN_MS to constants file

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-06 18:16:14 -08:00
parent bbe68942e1
commit 3a02c40b02
2 changed files with 2 additions and 2 deletions

View File

@@ -30,7 +30,7 @@ import { processTelegramReplies } from './lib/telegram_answers.mjs';
import { generateAnswer } from './lib/ai_answer.mjs'; import { generateAnswer } from './lib/ai_answer.mjs';
import { import {
APPLY_BETWEEN_DELAY_BASE, APPLY_BETWEEN_DELAY_JITTER, DEFAULT_MAX_RETRIES, APPLY_BETWEEN_DELAY_BASE, APPLY_BETWEEN_DELAY_JITTER, DEFAULT_MAX_RETRIES,
APPLY_RUN_TIMEOUT_MS, PER_JOB_TIMEOUT_MS APPLY_RUN_TIMEOUT_MS, PER_JOB_TIMEOUT_MS, RATE_LIMIT_COOLDOWN_MS
} from './lib/constants.mjs'; } from './lib/constants.mjs';
const DEFAULT_ENABLED_APPLY_TYPES = ['easy_apply', 'wellfound']; const DEFAULT_ENABLED_APPLY_TYPES = ['easy_apply', 'wellfound'];
@@ -51,7 +51,6 @@ async function main() {
const formFiller = new FormFiller(profile, answers, { apiKey, answersPath }); const formFiller = new FormFiller(profile, answers, { apiKey, answersPath });
const startedAt = Date.now(); const startedAt = Date.now();
const RATE_LIMIT_COOLDOWN_MS = 6 * 60 * 60 * 1000; // 6 hours
const rateLimitPath = resolve(__dir, 'data/linkedin_rate_limited_at.json'); const rateLimitPath = resolve(__dir, 'data/linkedin_rate_limited_at.json');
const results = { const results = {
submitted: 0, failed: 0, needs_answer: 0, total: 0, submitted: 0, failed: 0, needs_answer: 0, total: 0,

View File

@@ -91,3 +91,4 @@ export const DEFAULT_MAX_RETRIES = 2;
// --- Run limits --- // --- Run limits ---
export const APPLY_RUN_TIMEOUT_MS = 45 * 60 * 1000; // 45 minutes export const APPLY_RUN_TIMEOUT_MS = 45 * 60 * 1000; // 45 minutes
export const PER_JOB_TIMEOUT_MS = 10 * 60 * 1000; // 10 minutes per job export const PER_JOB_TIMEOUT_MS = 10 * 60 * 1000; // 10 minutes per job
export const RATE_LIMIT_COOLDOWN_MS = 6 * 60 * 60 * 1000; // 6 hours