Skip to content
This repository has been archived by the owner on Dec 9, 2022. It is now read-only.

Commit

Permalink
API: Include "correlationId" during device update
Browse files Browse the repository at this point in the history
This makes it easy for a caller to look at the install events taking
place during a device update.

Signed-off-by: Andy Doan <andy@foundries.io>
  • Loading branch information
doanac committed Apr 12, 2019
1 parent f81ff0d commit 074a9dc
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions ota_api/ota_ce.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,13 @@ def device_status(self, device):
# race condition, we need to probe our status again to be safe
# i'm cheating for now
return 'OK/TODO'

# This is kind of dirty as a side-effect to "device" probably isn't
# explected, but its the most efficient way to get this information
# to bubble up
cid = q[0].get('correlationId')
if cid:
device['correlationId'] = cid
for k, v in q[0]['targets'].items():
return 'Updating to ' + v['image']['filepath']

Expand Down

0 comments on commit 074a9dc

Please sign in to comment.