tracker
All repositories: gitoria
1.8 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'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.'}
Branches
Latest commits
- bf676d9elog: GC1 startedmre
- c7828541mission GC1mre
- ef949994conductor: neutral ticket rulemre
- 89e91ef3log: RV39 livemre
- ee2b677alog: RV39 deployingmre
- c1c4178cMerge branch 'rv39'mre
- a016e9abReapply "Merge branch 'rv39'"mre
- f29e2502log: RV39 gate fixmre
- d9fce111browser gate #26: exact frame count incl. SL1 people step (hybriel#308)mre
- ad529ac1log: m572 verdictmre
- 1b37d404RV39 on hold: hybriel#308mre
- f9127c68Revert "Merge branch 'rv39'"mre
- cd39f3d3log: hybriel#308mre
- 51341d6elog: RV39 deploy startedmre
- c9e29e06Merge branch 'rv39'mre
- 0f8d1fdclog: RV39 report, browser 387/2mre
- 50249b0bRV39: reportmre
- 10ed9581compose: HL_GC_STATS=1mre
- 955da19bRV39: re-vendor Hybriel set day39 (source 51e921d7, bin 6b481aa7)mre
- 64b8d1dclog: RV39 startedmre