hamsando / node-red-contrib-stoptimer-varidelay

Apache License 2.0
7 stars 2 forks source link

Timer does not survive node-red restart when running in a container due to location of stvd-timers directory #4

Closed Botched1 closed 4 years ago

Botched1 commented 4 years ago

When running node-red in a container, all data that needs to persist a reboot must be stored in the node-red user directory (the same one that the settings.js file is in).

Currently, 0.4.1 stores the stvd-timers directory in the main node-red code directory, and this does not persist container reboots. The dir needs to be put in the node-red user directory.

You probably need to check RED.settings.userDir in the code and use that as the root path for the folder.

Something remotely like: const stvdtimersFolder = path.join(RED.settings.userDir, "stvd-timers")

hamsando commented 4 years ago

As you noted, this is a simple fix - I should be able to get it out later tonight.

hamsando commented 4 years ago

Should be resolved in 0.4.2 just released here, should be in the pallette soon I guess.

Botched1 commented 4 years ago

Works perfectly! Thanks so much!