From ca00cd8d99d9c9b2fd344e3e739564feb96446d5 Mon Sep 17 00:00:00 2001 From: Chris Lee Date: Tue, 4 Apr 2023 19:56:28 +1000 Subject: [PATCH] chore: added migration to clear configuration --- ...1680602116944-flush-configuration-cache.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 migrations/1680602116944-flush-configuration-cache.js diff --git a/migrations/1680602116944-flush-configuration-cache.js b/migrations/1680602116944-flush-configuration-cache.js new file mode 100644 index 00000000..2688f610 --- /dev/null +++ b/migrations/1680602116944-flush-configuration-cache.js @@ -0,0 +1,19 @@ +const path = require('path'); +const { logger: rootLogger, cache } = require('../app/helpers'); + +module.exports.up = async () => { + const logger = rootLogger.child({ + gitHash: process.env.GIT_HASH || 'unspecified', + migration: path.basename(__filename) + }); + + logger.info('Start migration'); + + cache.hdelall('trailing-trade-configurations:*'); + + logger.info('Finish migration'); +}; + +module.exports.down = next => { + next(); +};