Code: Select all
def _mainloop(self):
while True:
if error_occurred:
piface.digital_write(7, int(self.led_toggle_state))
self.led_toggle_state = not self.led_toggle_state
if self._update_time_passed >= DATABASE_UPDATE_INTERVAL * 60:
self.updateDatabase()
self.writeDatabase()
self._update_time_passed = 0
self._update_time_passed += 1
time.sleep(1)
so 60 * 60 = 3600 s = 1 Hour
is it possible the self._update_time_passed += 1 is causing the raspberry pi to eventually break and cause the error 500? or should i be looking elsewhere in the script?