- if isinstance(self.caller, Node):
- node = self.caller
- node.update_last_contact()
+ node.update_last_contact()
+ node.update_last_boot()
+
+ current_time = int(time.time())
+ # if last_pcu_reboot is within 20 minutes of current_time, accept that the PCU is responsible
+ if node['last_pcu_reboot'] and Timestamp.cast_long(node['last_pcu_reboot']) >= current_time - 60*20:
+ node.update_last_pcu_confirmation(commit=False)
+
+ node.sync(commit = True)