gitoria

tracker

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commitb5357ac4b5357ac4Pack the people order and release completed startup arraysmreb5357ac4/tests/seed-franchises.hl

2.3 KB

  1. // tests/seed-franchises.hl — GATE FIXTURE for tracker.worldapi.org#19 (mission 066, tests/franchises.mjs): movies with TMDB ids
  2. // for the collection seed, written into the gate's storage AFTER tests/seed-show.hl, before the server starts. What the fake TMDB
  3. // says about them (tests/franchises.mjs):
  4. // 9101 Gate Alien (1979), 9102 Gate Aliens (1986), 9103 Gate Alien 3 (1992) → collection 900 "Gate Alien Collection", whose
  5. // parts come OUT of release order, with a part we don't have (9999) and an ADULT one we have (9105, adult = true: never
  6. // asked, never in the timeline)
  7. // 9104 Gate Loner (2000) → collection 901, its only part we have → no timeline
  8. // 9106 Gate Standalone (2001) → no collection
  9. // 9107 Gate Missing (2002) → TMDB answers 404
  10. // Self-assigned ids, one put() each (never update(), see seed-show.hl).
  11. import { MPackDB } from 'hl:mpackdb'
  12. import { env } from 'hl:proc'
  13. storageDir = env('TRACKER_STORAGE')
  14. if (storageDir == null || !storageDir.startsWith('/')) { hlError('set TRACKER_STORAGE, absolute') }
  15. showsTable = new MPackDB(file = storageDir + '/shows.db', primaryKey = '@id', indexes = ['!oldId'])
  16. movie = (id, tmdbId, title, release, slug, adult) => {
  17. showsTable.put({
  18. adult = adult id = id title = title summary = null tmdbSummary = null tmdbId = tmdbId
  19. language = 'en' type = 'movie' release = release year = toNumber(release.slice(0, 4)) image = null urlSegment = slug
  20. episodesCount = null homepage = null imdbId = null seasonsCount = null status = 'Released' tagline = null
  21. tvdbId = null tvmzId = null genres = [] cast = [] seasons = [] oldId = 'fr-' + tmdbId
  22. })
  23. return true
  24. }
  25. movie('fr0000000000f101', 9101, 'Gate Alien', '1979-05-25', 'gate-alien', false)
  26. movie('fr0000000000f102', 9102, 'Gate Aliens', '1986-07-18', 'gate-aliens', false)
  27. movie('fr0000000000f103', 9103, 'Gate Alien 3', '1992-05-22', 'gate-alien-3', false)
  28. movie('fr0000000000f104', 9104, 'Gate Loner', '2000-01-01', 'gate-loner', false)
  29. movie('fr0000000000f105', 9105, 'Gate Adult Alien', '1990-01-01', 'gate-adult-alien', true)
  30. movie('fr0000000000f106', 9106, 'Gate Standalone', '2001-01-01', 'gate-standalone', false)
  31. movie('fr0000000000f107', 9107, 'Gate Missing', '2002-01-01', 'gate-missing', false)
  32. showsTable.persist()
  33. console.log('seed-franchises: 7 movies')

Branches

Latest commits

  • b5357ac4Pack the people order and release completed startup arraysmre
  • 2e7d6257log: HM1 startedmre
  • 2f790465mission HM1: heap object breakdownmre
  • a18957falog: evening re-measure after CBmre
  • aac9a98dlog: evening re-measure startmre
  • 45163bd4log: person/tmdb error hypothesismre
  • cb38de2blog: swap 503 causemre
  • fd10c3d5log: CB livemre
  • 7557c025log: CB deploy try 2mre
  • 06a7534aMerge branch 'cb'mre
  • 2f8030d6log: CB gates greenmre
  • 498bf644log: CB gates startmre
  • f59c2847gc1: bound the five request caches (shows.hl cacheLimit)mre
  • 6ea2c6d6log: morning re-measure 11-04mre
  • 446290f0log: GC1 livemre
  • 8e6aa91dlog: GC1 deploy retrymre
  • 87ad2dc1log: GC1 deployingmre
  • 53f10fb8Merge branch 'gc1-deploy'mre
  • 7fcbf1d2log: GC1 deploy GOmre
  • 1fb6664bcompose: TRACKER_QSTATS=1 (GC1 measurement)mre