We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4e6c273 commit 72140bbCopy full SHA for 72140bb
1 file changed
script/purge-redis-pages.js
@@ -8,7 +8,6 @@
8
//
9
// [end-readme]
10
11
-const program = require('commander')
12
const Redis = require('ioredis')
13
14
const { REDIS_URL, HEROKU_RELEASE_VERSION, HEROKU_PRODUCTION_APP } = process.env
@@ -21,12 +20,8 @@ const startTime = Date.now()
21
20
const expirationDuration = 30 * 60 * 1000 // 30 minutes
22
const expirationTimestamp = startTime + expirationDuration // 30 minutes from now
23
24
-program
25
- .description('Purge the Redis rendered page cache')
26
- .option('-d, --dry-run', 'print keys to be purged without actually purging')
27
- .parse(process.argv)
28
-
29
-const dryRun = program.dryRun
+// print keys to be purged without actually purging
+const dryRun = ['-d', '--dry-run'].includes(process.argv[2])
30
31
// verify environment variables
32
if (!REDIS_URL) {
0 commit comments