Add cache warming command

This commit is contained in:
Matt Isenhower
2022-09-11 14:39:19 -07:00
parent bc8325f4a3
commit 33d58a4c50
2 changed files with 4 additions and 1 deletions

View File

@@ -3,6 +3,7 @@ import consoleStamp from 'console-stamp';
import cron from './cron.mjs';
import { sendTweets } from './twitter/index.mjs';
import { updateAll } from './data/index.mjs';
import { warmCache } from "./splatnet/index.mjs";
consoleStamp(console);
dotenv.config();
@@ -11,6 +12,7 @@ const actions = {
cron,
twitter: sendTweets,
splatnet: updateAll,
warmCache,
}
const command = process.argv[2];

View File

@@ -8,7 +8,8 @@
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs --fix --ignore-path .gitignore",
"cron": "node app/index.mjs cron",
"twitter": "node app/index.mjs twitter",
"splatnet": "node app/index.mjs splatnet"
"splatnet": "node app/index.mjs splatnet",
"warmCache": "node app/index.mjs warmCache"
},
"dependencies": {
"console-stamp": "^3.0.6",