Fix unit of measure for lastUpdated info extraction
This commit is contained in:
parent
92a3d52885
commit
5b6919e0c6
@ -83,6 +83,10 @@ module.exports = function(){
|
||||
});
|
||||
};
|
||||
|
||||
//
|
||||
// Invoke callback with number of milliseconds since
|
||||
// last update in any of the given tables
|
||||
//
|
||||
me.findLastUpdated = function (username, api_key, tableNames, callback) {
|
||||
var sql = 'SELECT EXTRACT(EPOCH FROM max(updated_at)) as max FROM CDB_TableMetadata m WHERE m.tabname::name = any (\'{'
|
||||
+ tableNames.join(',') + '}\')';
|
||||
@ -99,7 +103,7 @@ module.exports = function(){
|
||||
if(rows.length !== 0) {
|
||||
last_updated = rows[0].max || 0;
|
||||
}
|
||||
callback(null, last_updated);
|
||||
callback(null, last_updated*1000);
|
||||
});
|
||||
};
|
||||
|
||||
|
@ -14,7 +14,7 @@ var o = function(port, cb) {
|
||||
} else if ( query.q.match('EPOCH.* as max') ) {
|
||||
// This is the structure of the known query sent by tiler
|
||||
var row = {
|
||||
'max': 1234567890123
|
||||
'max': 1234567890.123
|
||||
};
|
||||
res.write(JSON.stringify({rows: [ row ]}));
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user