feat: add empty and refill unit machine actions
fix: remove certain actions from the state middleware after being consumed by the poller
This commit is contained in:
parent
2e9bb3c7df
commit
797f074898
10 changed files with 163 additions and 2 deletions
|
|
@ -96,6 +96,8 @@ function poll (req, res, next) {
|
|||
const reboot = pid && state.reboots?.[operatorId]?.[deviceId] === pid
|
||||
const shutdown = pid && state.shutdowns?.[operatorId]?.[deviceId] === pid
|
||||
const restartServices = pid && state.restartServicesMap?.[operatorId]?.[deviceId] === pid
|
||||
const emptyUnit = pid && state.emptyUnit?.[operatorId]?.[deviceId] === pid
|
||||
const refillUnit = pid && state.refillUnit?.[operatorId]?.[deviceId] === pid
|
||||
const langs = localeConfig.languages
|
||||
|
||||
const locale = {
|
||||
|
|
@ -119,6 +121,8 @@ function poll (req, res, next) {
|
|||
reboot,
|
||||
shutdown,
|
||||
restartServices,
|
||||
emptyUnit,
|
||||
refillUnit,
|
||||
hasLightning,
|
||||
receipt,
|
||||
operatorInfo,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue