tracker
All repositories: gitoria
2.1 KB
// lib/warm.hl — THE START-UP STATE (mission T17, boot time): the server listens BEFORE the derived structures (public lists, slug maps,// search index, short ids, people view) are built; bootscan.hl builds them in time-boxed steps between requests. This is the one// place that says how far it is. `running` = a progressive start is under way (a module's lazy full-scan fallback must NOT run// then — it would block the server for minutes); the three flags turn true one after the other:// titles → the slug map (shows.hl), the titles' own derived data are in// catalog → titles + episodes: the public lists, the genre lists, the newest-episode dates (catalog.hl)// people → everything: search index, short ids (owners), person slug / TMDB maps, /people's order; the jobs start// A tool or a test that never starts the progressive scan has running = false: the modules' lazy builds work as before.import { now } from 'hl:time'import { Response } from 'hl:http1'static warm = { running = false titles = false catalog = false people = false phase = '' rows = 0 startedAt = 0 readyAt = 0 }static warmRunning = () => { return warm.running }// what a page that needs `level` ('titles' | 'catalog' | 'all') may do: true = go aheadstatic warmReady = (level) => {if (!warm.running) { return true }if (level == 'titles') { return warm.titles }if (level == 'catalog') { return warm.catalog }return warm.people}// the writers that rely on the complete indexes (a duplicate title / person / short id otherwise) refuse until all is builtstatic warmBlocked = () => { return warm.running && !warm.people }static warmSeconds = () => {if (warm.startedAt == 0) { return 0 }s = (now() - warm.startedAt) / 1000return s - s % 1}static warmText = () => {return 'tracker is starting up: the lists, the search and the people are being built (' + warm.phase + ', ' + warmSeconds() + ' s so far). Reload this page in a minute or two.'}static startingUpText = () => { return new Response('tracker is starting up, try again in a minute', { status = 503 headers = { 'Retry-After' = '30' 'Content-Type' = 'text/plain; charset=utf-8' 'X-Content-Type-Options' = 'nosniff' } }) }
Branches
Latest commits
- d2e6d26bMerge branch 'records-park55' into mainTracker
- f567f025|||PR records: park #55, no Claude workers ruleTracker
- c21aff6bMerge branch 'records-hm55c' into mainTracker
- 9ba258d3|||PR records: HM55b resultTracker
- 64f2d300Merge branch 'records-hm55b2' into mainTracker
- ae3b80dc|||PR records: HM55b briefTracker
- 7ef3cb3bMerge branch 'records-st55' into mainTracker
- fec2e080|||PR records: STATUS HM55Tracker
- 8e174918Merge branch 'records-hm55b' into mainTracker
- b1ecee57|||PR records: HM55 stateTracker
- 28eab08cMerge branch 'records-hm55' into mainTracker
- d3edaa05|||PR records: HM55 start, PROCEDURES.mdTracker
- 3059f86cMerge branch 'records-design-rule' into mainTracker
- 421a4809|||PR records: his-design rule (Apollo 2026-11-13)Tracker
- d1390692Merge branch 'records-dp75b' into mainTracker
- a4d1a7d2|||PR records: later steps checked, branch auditTracker
- e070e16fMerge branch 'records-dp75' into mainTracker
- 642b4fa8|||PR records: DP75 day62 live, AP62 briefTracker
- bfc4ea4dMerge branch 'ap62' into mainTracker
- 2c95ac46|||PR AP62: re-vendor Hybriel set day62 (source 70341ad2, bin a54f5f08)Tracker