gitoria

tracker

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commitb2e2206db2e2206dlog: #63 livemreb2e2206d/tests/seed-shortids.hl

1.4 KB

  1. // tests/seed-shortids.hl — GATE FIXTURE for mission 060 (tracker.worldapi.org#27, short ids): written by tests/browser.mjs into
  2. // the gate's storage while the app is STOPPED (one process per storage, hybriel#21), after every record already has its short
  3. // id. Self-assigned ids, one put() each.
  4. //
  5. // Short Person 01…60 no short id → the next start's backfill gives them one (the resume check stops it part way)
  6. // Dupe Person A, B BOTH carry 'aaaa1' → the next start keeps it for A (scanned first) and gives B a new one
  7. import { MPackDB } from 'hl:mpackdb'
  8. import { env } from 'hl:proc'
  9. storageDir = env('TRACKER_STORAGE')
  10. if (storageDir == null || !storageDir.startsWith('/')) { hlError('set TRACKER_STORAGE, absolute') }
  11. personsTable = new MPackDB(file = storageDir + '/persons.db', primaryKey = '@id', indexes = ['!oldId'])
  12. let i = 1
  13. while (i <= 60) {
  14. let nn = i < 10 ? '0' + i : '' + i
  15. personsTable.put({ id = 'sp00000000000p' + nn name = 'Short Person ' + nn urlSegment = 'Short-Person-' + nn tmdbId = null shows = [] oldId = 'sp' + nn })
  16. i = i + 1
  17. }
  18. personsTable.put({ id = 'sp0000000000dupa' name = 'Dupe Person A' urlSegment = 'Dupe-Person-A' tmdbId = null shows = [] oldId = 'spdupa' shortId = 'aaaa1' })
  19. personsTable.put({ id = 'sp0000000000dupb' name = 'Dupe Person B' urlSegment = 'Dupe-Person-B' tmdbId = null shows = [] oldId = 'spdupb' shortId = 'aaaa1' })
  20. personsTable.persist()
  21. console.log('seed short ids: 62 persons (60 without a short id, 2 sharing aaaa1)')

Branches

Latest commits

  • b2e2206dlog: #63 livemre
  • 5831e0e0log: HM64 donemre
  • ea8a759elog: #61 #62 live, DP63 and HM64 startedmre
  • 40439456Merge hm63-searchtext: tracker#63 packed search textmre
  • b7e6b48ePack normalized search text behind numeric offsetsmre
  • b35f53e1log: DP62 stale runtime decisionmre
  • f9593602log: Apollo deploy rule correctionmre
  • 3c95f7f3log: DP62 and HM63 startedmre
  • 9c4397c9mission HM63mre
  • 8dfe42c8mission DP62mre
  • e347fef4Merge rv44: tracker#61 #62 on Hybriel day44mre
  • 8274bcf1log: RV44 done, deploy held for the usage windowmre
  • 1ef7a3b1RV44: report day44 gates and migration/restart proofsmre
  • a5f62f6cRV44: re-vendor Hybriel set day44 (source 222edef7, bin 4f0f263e)mre
  • 6159a248Merge branch 'hm62-personindex' into rv44mre
  • a8923d93log: RV44 startedmre
  • cf28cf77mission RV44mre
  • 585782dfLog: tracker#60 Chrome look, STATUS rewrittenmre
  • 147d0172conductor: caramboleyo is the user, not owner/creatorApollo
  • 21dd0cfblog: #60 live measurement, reviewmre