include previous misses in cache-asset-manifests

Originally, this was sorta a cache warmup script: we wanted to fill in manifests that we hadn't checked for yet.

But now, I want to _also_ check previous cache misses, that we stored in the db as an empty string. Maybe it's been converted now!
This commit is contained in:
Emi Matchu 2020-12-28 14:04:28 -08:00
parent fd864ab8ec
commit 6168f98b8e

View file

@ -16,10 +16,9 @@ const connectToDb = require("../src/server/db");
const neopetsAssets = require("../src/server/neopets-assets");
async function cacheAssetManifests(db) {
const [
rows,
] = await db.execute(
`SELECT id, url FROM swf_assets WHERE manifest IS NULL AND id >= ? ` +
const [rows] = await db.execute(
`SELECT id, url FROM swf_assets ` +
`WHERE manifest IS NULL OR manifest = "" AND id >= ? ` +
`ORDER BY id`,
[argv.start || 0]
);