diff --git a/scripts/cache-asset-manifests.js b/scripts/cache-asset-manifests.js index aa3d616..f3435a0 100644 --- a/scripts/cache-asset-manifests.js +++ b/scripts/cache-asset-manifests.js @@ -52,7 +52,7 @@ async function cacheAssetManifests(db) { // Make it a JSON string, then escape the string for the query. // Hacky for sure! const escapedManifest = JSON.stringify(JSON.stringify(manifest)); - console.log( + console.info( `UPDATE swf_assets SET manifest = ${escapedManifest}, ` + `manifest_cached_at = CURRENT_TIMESTAMP() ` + `WHERE id = ${row.id} LIMIT 1;` @@ -115,10 +115,10 @@ async function main() { try { await cacheAssetManifests(db); } catch (e) { - db.close(); + db.end(); throw e; } - db.close(); + db.end(); } main().catch((e) => { diff --git a/scripts/export-users-to-auth0.js b/scripts/export-users-to-auth0.js index 5aed213..231a656 100644 --- a/scripts/export-users-to-auth0.js +++ b/scripts/export-users-to-auth0.js @@ -71,7 +71,7 @@ async function main() { ); users = rows.map(normalizeRow); } finally { - db.close(); + db.end(); } let i = 0;