Hivemapper / odc-api

Software and APIs used to run the Open Dashcam (ODC) devices that collect data on the Hivemapper Mapping Network
10 stars 6 forks source link

Added anonymous ID to dashcam and metadata files #165

Closed HariHive closed 4 months ago

HariHive commented 4 months ago
mazar-farran commented 4 months ago

If I'm understanding correctly, with this change, we are generating an anonymous ID on odc-api initialization. Then we store it in a new table deviceInfo for anonymous ID's. This anonymous ID is sent inside of FrameKM metadata.

Just so I understand better, what is the purpose of persisting the anonymous ID if we are creating a new anonymous ID on odc-api start? Is another process using this ID?

HariHive commented 4 months ago

If I'm understanding correctly, with this change, we are generating an anonymous ID on odc-api initialization. Then we store it in a new table deviceInfo for anonymous ID's. This anonymous ID is sent inside of FrameKM metadata.

Just so I understand better, what is the purpose of persisting the anonymous ID if we are creating a new anonymous ID on odc-api start? Is another process using this ID?

@mazar-farran We create an Anonymous ID when not present, i.e create only once and later we use it again and again. That is why I have Insert or Ignore in place for adding anonymous ID into deviceInfo table. I think we eventually want to save all deviceInfo like ssid, serial number and other values also into DeviceInfo table along with Anonymous ID, hence we are persisting the data

mazar-farran commented 4 months ago

Ok, I see, I missed the INSERT OR IGNORE. Then LGTM

please also add the ticket to the PR description