Currently, every night at reboot a data point is lost because the device reboots right before the end of a 5-minute interval. Instead, let's make a way to tell the Manager to stop after this interval.
SIGQUIT looks like a nice sounding signal to use. It can be sent from bash with sudo kill -s SIGQUIT and this can go in dosenet.sh as a new option, finish.
In python, you'll want a second signal handler for the new signal, and some way to communicate this condition into the Manager instance that is running. Try options on sys.exit() or else you may need to define the signal handler inside of if __name__ == '__main__':
Currently, every night at reboot a data point is lost because the device reboots right before the end of a 5-minute interval. Instead, let's make a way to tell the Manager to stop after this interval.
SIGQUIT
looks like a nice sounding signal to use. It can be sent frombash
withsudo kill -s SIGQUIT
and this can go indosenet.sh
as a new option,finish
.In python, you'll want a second signal handler for the new signal, and some way to communicate this condition into the Manager instance that is running. Try options on
sys.exit()
or else you may need to define the signal handler inside ofif __name__ == '__main__':