lamassu-server/lib/middlewares/state.js
Sérgio Salgado 797f074898 feat: add empty and refill unit machine actions
fix: remove certain actions from the state middleware after being consumed by the poller
2023-06-07 14:27:43 +01:00

22 lines
525 B
JavaScript

const NodeCache = require('node-cache')
const SETTINGS_CACHE_REFRESH = 3600
module.exports = (function () {
return {
oldVersionId: 'unset',
needsSettingsReload: {},
settingsCache: new NodeCache({
stdTTL: SETTINGS_CACHE_REFRESH,
checkperiod: SETTINGS_CACHE_REFRESH // Clear cache every hour
}),
canLogClockSkewMap: {},
canGetLastSeenMap: {},
pids: {},
reboots: {},
shutdowns: {},
restartServicesMap: {},
emptyUnit: {},
refillUnit: {},
mnemonic: null
}
}())