makeitlabs / ratt

RATT (RFID All The Things) is an RFID access control system primarily for use on tools and equipment in makerspace environments. Based on Raspberry Pi Zero W and a custom hardware control board.
23 stars 4 forks source link

Avoid ACL reload if no changes #14

Closed bkgoodman closed 2 years ago

bkgoodman commented 5 years ago

Shortcut ACL reload process if no changes are made. This process is user visible (although only briefly), so we should probably try to minimize disruption/impacts due to it.

I would propose some sort of thing like - RATT stores and compares checksums of last loaded and new files - skips if they match. There are obviously cases in which this would fall through, but I believe it work work most of the time, with no ill-affects.

tangentaudio commented 5 years ago

This is already how it works - what's the actual symptom you're seeing?

bkgoodman commented 5 years ago

I had been seeing a few seconds of the "Updating" message every time a kick was done. I was just worried that if something weird was happening (like a persona was doing a whole bunch of user-updates), this would happen over and over and over in the middle of someone trying to use a tool, and it may interfere.

tangentaudio commented 2 years ago

This was never really a bug - during the idle loop, the ACL stats would be displayed after any update whether it was same hash or not. This was just to show an update occurred. During active use, no such display would take place. In new code (yet to be deployed) there is now a top status bar indicator that shows last update status. The idle loop also now will NOT show the stats if the update was the same hash. Closing this out for now.