dneise / MeHR

Mews HoKo Reporter
MIT License
0 stars 2 forks source link

how to deal with crashes and restarts? #4

Open dneise opened 6 years ago

dneise commented 6 years ago

If MeHR crashes and is restarted maybe 5 days later because the hotel staff only realized that MeHR is down, when the police asks them for the missing reports, then the people need a way to:

In addition, assuming MeHR crashes right after creating and uploading todays report, and somebody restarts it, it should not create and upload todays report again.

dneise commented 6 years ago

Both cases could maybe be handled by storing the dates successfully handled and configuring the first date we want to create and upload reports for. So if MeHR is started at any day, it which reports between "right now" and "the first date" have been done, if one date is missing, MeHR will simply create and upload the report for that date.

The user in this case has nothing to do but start MeHR, and make sure the first date is configured somehow correctly.

dneise commented 6 years ago

MeHR is running as a Windows service not (german: Dienst). In order to make MeHR a service, while it is just a normal executable, we use a third party tool called: NSSM

http://nssm.cc

NSSM takes care of restarting MeHR in case it crashed, handles log files, and should also restart MeHR after a server restart.