Sessions 5-7a: 955 tests, deployment ready

This commit is contained in:
Kev
2026-06-08 18:35:13 -04:00
parent 06b82624a2
commit 1fa04dc776
371 changed files with 49366 additions and 955 deletions
+4 -4
View File
@@ -6,7 +6,7 @@ const ODDS_API_BASE = 'https://api.the-odds-api.com/v4/sports';
const CACHE_TTL = 900; // 15 minutes in seconds
const SPORT_KEYS = { nba: 'basketball_nba', ncaab: 'basketball_ncaab' };
const ALL_MARKETS = Object.keys(MARKET_MAP).join(',') + ',spreads';
const BOOKMAKERS = 'draftkings,fanduel,betmgm';
const BOOKMAKERS = 'draftkings,fanduel,betmgm,caesars,fanatics,bet365,hardrockbet,pointsbet,betrivers';
function getCacheKey(sport) {
const now = new Date();
@@ -33,7 +33,7 @@ async function updateQuota(redis, headers) {
await redis.hset(key, 'remaining', String(remaining), 'used', String(used || 0), 'last_checked', new Date().toISOString());
await redis.expire(key, 60 * 60 * 24 * 35); // keep for ~1 month
if (parseInt(remaining, 10) < 50) {
console.warn(`[BetonBLK] Odds API quota low: ${remaining} credits remaining`);
console.warn(`[VYNDR] Odds API quota low: ${remaining} credits remaining`);
}
}
return remaining != null ? parseInt(remaining, 10) : null;
@@ -81,7 +81,7 @@ async function fetchAllOdds(sport, apiKey) {
for (const event of events) {
const quotaLeft = lastHeaders['x-requests-remaining'];
if (quotaLeft != null && parseInt(quotaLeft, 10) <= 0) {
console.warn('[BetonBLK] Quota exhausted mid-fetch, stopping');
console.warn('[VYNDR] Quota exhausted mid-fetch, stopping');
break;
}
@@ -157,7 +157,7 @@ async function getOdds(sport) {
scratchedPlayers = cascadeResult.scratchedPlayers || [];
} catch (e) {
// Non-fatal — log and continue
console.warn('[BetonBLK] Movement/cascade detection error:', e.message);
console.warn('[VYNDR] Movement/cascade detection error:', e.message);
}
return {