Open kevinswiber opened 9 years ago
Could we _ the hash to fix this?
@mdobson We don't save underscore-prefixed properties in the registry.
What a nightmare.
-- Matthew Dobson | apigee https://apigee.com/ | m: +1.734.634.5472 | twitter @mdobs http://twitter.com/mdobs @apigee https://twitter.com/apigee | Apigee Community http://community.apigee.com/ for answers, ideas and support! [image: http://iloveapis.com/]
On Thu, Jul 9, 2015 at 1:42 PM, Kevin Swiber notifications@github.com wrote:
@mdobson https://github.com/mdobson We don't save underscore-prefixed properties in the registry.
— Reply to this email directly or view it on GitHub https://github.com/zettajs/zetta-auto-scout/issues/6#issuecomment-120083470 .
A hash that maps to a device is created and stored as a device property. The device data is saved with that hash property. The hash is then removed from that in-memory representation so it doesn't appear in API responses.
When
device.save
is called anytime in the future, such as when updating the device data after initialization, that hash property is not included.When the server is restarted, it looks for that hash. When the hash isn't found, it creates a new device, providing the illusion that updated device data did not persist.