Skip to content

Add Backend Synchronize call for app state history #125

@markope

Description

@markope

This feature is mainly important for billing and also directly was addressed by haverboecker.
Billing run needs the full state history to be able to add consumed usage of the past to the current bill.

The agent should call a backend function (no publish) and transmit the app state history consisting of

  • device_key
  • release_key
  • state
  • transition time as timestamp (millisecond resolution like timestamp in postgres)

When the function call returns "success", then the records that have been transfered should be removed from the local sqllite db by the agent. The function should be called before the agent starts the downstream sync with the backend to avoid weird behavior!

Note that the corresponding postgres function has to make sure that contradicting histories of two different physical devices with the same device config do not collide!

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions