tracker
All repositories: gitoria
2.1 KB
// Search is complete while the resumable people view still yields. A retry must// be refused before imports reach credits and mark missing cast as complete.import { now } from 'hl:time'import { applyCredits } from '../lib/credits.hl'import { warm } from '../lib/warm.hl'import { showsTable } from '../lib/shows.hl'import { indexShow, finishSearchIndex, dbSearch, importTitle } from '../lib/search.hl'import { noteViewRow, finishPeopleViewStep } from '../lib/people.hl'static check = () => {s = { id = 'boot-import' title = 'Boot window' type = 'movie' tmdbId = 999999 adult = false urlSegment = 'Boot-window' cast = [] }if (showsTable.fetch(s.id) == null && showsTable.put(s) == null) { hlError('fixture not stored') }indexShow(&s)warm.running = truewarm.people = falsefinishSearchIndex(now())for (let i = 0; i < 4096; i = i + 1) { noteViewRow({ id = 'person-' + i added = i % 5 }) }if (finishPeopleViewStep(0)) { hlError('fixture must pause people finalization') }if (dbSearch('Boot').warming) { hlError('search should already work') }r = importTitle('movie', 999999)if (r.error != 'tracker is starting up, try again in a minute') {// Reproduce the credits write reached by a new import in this same window.applyCredits(s.id, { adult = false credits = { cast = [{ id = 777777 name = 'Window Actor' character = 'Lead' }] crew = [{ id = 888888 name = 'Window Director' job = 'Director' }] } })broken = showsTable.fetch(s.id)console.log('unsafe window: creditsAt=' + broken.creditsAt + ' cast=' + broken.cast.length + ' crew=' + broken.crew.length)hlError('import crossed people window and persisted incomplete credits')}stored = showsTable.fetch(s.id)if (stored.creditsAt != null || stored.cast.length != 0) { hlError('blocked import changed credits') }while (!finishPeopleViewStep(0)) { }warm.people = truer2 = importTitle('movie', 999999)if (r2.show != s.id || r2.created != false) { hlError('retry failed after people ready') }r3 = importTitle('movie', 999999)if (r3.show != s.id || r3.created != false) { hlError('repeat import lost identity') }console.log('boot import: early search usable, import refused, retry and repeat preserve title')return null}check()
Branches
Latest commits
- 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
- b9c7c3c8Merge branch 'records-dp74' into mainTracker
- 85cfb4ae|||PR records: AP61 day61, DP74 liveTracker
- b1496147Merge branch 'ap61' into mainTracker
- 2047955bMerge branch 'u12-gateports' into mainTracker
- c8da40f3|||PR AP61: re-vendor Hybriel set day61 (source a05af47c, bin a11042e5)Tracker
- 4e018678|||PR deploy.sh: gates use Tracker's ports 8716-8719 and LC_ALL=C; README: 2 backups keptTracker
- 0b86324aMerge branch 'records-dp73' into mainTracker
- 9ce5f59b|||PR records: DP73 live 613ae0e; deploy.sh keeps 2 backupsTracker
- 613ae0ecMerge branch 'bs3' into mainTracker
- 1383264b|||PR BS3: keep shared synchronous sorting fastTracker
- 63e5ba1a|||PR BS3: guard boot imports and share resumable sort buffersTracker
- 310613f1Merge branch 'records-dp72' into mainTracker
- 6f7b61ba|||PR records: deploy-swap fix live, Kunibert findingsTracker
- c41587d2Merge branch 'bs2' into mainTracker
- 0dd538a6|||PR BS2: finish the boot index in slices so a booting instance keeps answeringTracker
- 019d5cedMerge branch 'records-1110' into mainTracker
- f88ae8b9|||PR records: day56 toggle live, reviewTracker