zettajs / zetta-auto-scout

A basic Scout for auto-wiring devices in Zetta.
MIT License
1 stars 1 forks source link

Device data updates are not visible on subsequent server runs. #6

Open kevinswiber opened 9 years ago

kevinswiber commented 9 years ago

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.

mdobson commented 9 years ago

Could we _ the hash to fix this?

kevinswiber commented 9 years ago

@mdobson We don't save underscore-prefixed properties in the registry.

mdobson commented 9 years ago

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 .