diff --git a/src/appdb.js b/src/appdb.js index 0ca9057fb..5d5d648b3 100644 --- a/src/appdb.js +++ b/src/appdb.js @@ -463,7 +463,7 @@ function setHealth(appId, health, healthTime, callback) { assert(util.types.isDate(healthTime)); assert.strictEqual(typeof callback, 'function'); - var values = { health, healthTime }; + const values = { health, healthTime }; updateWithConstraints(appId, values, '', callback); } @@ -474,7 +474,9 @@ function setTask(appId, values, options, callback) { assert.strictEqual(typeof options, 'object'); assert.strictEqual(typeof callback, 'function'); - if (!options.requireNullTaskId) return updateWithConstraints(appId, values, '', callback); + values.ts = new Date(); + + if (!options.requireNullTaskId) return updateWithConstraints(appId, values, '', callback); if (options.requiredState === null) { updateWithConstraints(appId, values, 'AND taskId IS NULL', callback);