apps: update ts in code instead of database
ts is useful as a versioning mechanism (for example, icon changed). update the timestamp explicity in code instead of db. this way health and healthTime can be updated without changing ts.
This commit is contained in:
@@ -367,6 +367,9 @@ function clear(callback) {
|
||||
}
|
||||
|
||||
function update(id, app, callback) {
|
||||
// ts is useful as a versioning mechanism (for example, icon changed). update the timestamp explicity in code instead of db.
|
||||
// this way health and healthTime can be updated without changing ts
|
||||
app.ts = new Date();
|
||||
updateWithConstraints(id, app, '', callback);
|
||||
}
|
||||
|
||||
@@ -457,7 +460,7 @@ function updateWithConstraints(id, app, constraints, callback) {
|
||||
function setHealth(appId, health, healthTime, callback) {
|
||||
assert.strictEqual(typeof appId, 'string');
|
||||
assert.strictEqual(typeof health, 'string');
|
||||
assert(util.isDate(healthTime));
|
||||
assert(util.types.isDate(healthTime));
|
||||
assert.strictEqual(typeof callback, 'function');
|
||||
|
||||
var values = { health, healthTime };
|
||||
|
||||
Reference in New Issue
Block a user