From 43c1b2f92c6d3e7c2ab4131a579f86990794ba7f Mon Sep 17 00:00:00 2001 From: Pablo Carranza Velez Date: Sun, 23 Oct 2016 20:11:11 -0300 Subject: [PATCH] Log whether deltas are being used when downloading an app --- CHANGELOG.md | 2 ++ src/application.coffee | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 16e2e7a8..95d96dec 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,5 @@ +* Log whether deltas are being used when downloading an app [Pablo] + # v2.7.0 * Upgrade docker-progress to v2.3.1 [Pablo] diff --git a/src/application.coffee b/src/application.coffee index ae5afceb..11793d10 100644 --- a/src/application.coffee +++ b/src/application.coffee @@ -36,6 +36,9 @@ logTypes = downloadApp: eventName: 'Application download' humanName: 'Downloading application' + downloadAppDelta: + eventName: 'Application delta download' + humanName: 'Downloading delta for application' downloadAppSuccess: eventName: 'Application downloaded' humanName: 'Downloaded application' @@ -182,15 +185,16 @@ fetch = (app, setDeviceUpdateState = true) -> docker.getImage(app.imageId).inspectAsync() .catch (error) -> - logSystemEvent(logTypes.downloadApp, app) device.updateState(status: 'Downloading', download_progress: 0) Promise.try -> conf = JSON.parse(app.config) if conf['RESIN_SUPERVISOR_DELTA'] == '1' + logSystemEvent(logTypes.downloadAppDelta, app) dockerUtils.rsyncImageWithProgress(app.imageId, onProgress) else + logSystemEvent(logTypes.downloadApp, app) dockerUtils.fetchImageWithProgress(app.imageId, onProgress) .then -> logSystemEvent(logTypes.downloadAppSuccess, app)