mirror of
https://github.com/seejohnrun/haste-server.git
synced 2024-12-25 11:37:00 +00:00
bugfixes
This commit is contained in:
parent
e3d18efdc6
commit
b6814a1445
1 changed files with 4 additions and 3 deletions
|
@ -1,6 +1,6 @@
|
|||
/*global require,module,process*/
|
||||
|
||||
const datastore = require('@google-cloud/datastore');
|
||||
const Datastore = require('@google-cloud/datastore');
|
||||
const winston = require('winston');
|
||||
|
||||
class GoogleDatastoreDocumentStore {
|
||||
|
@ -15,7 +15,7 @@ class GoogleDatastoreDocumentStore {
|
|||
// Save file in a key
|
||||
set(key, data, callback, skipExpire) {
|
||||
var now = new Date();
|
||||
var expireTime = skipExpire ? null : new Date(now.getTime() + this.expire * 1000;
|
||||
var expireTime = skipExpire ? null : new Date(now.getTime() + this.expire * 1000);
|
||||
|
||||
var taskKey = this.datastore.key([this.kind, key])
|
||||
var task = {
|
||||
|
@ -70,7 +70,7 @@ class GoogleDatastoreDocumentStore {
|
|||
},
|
||||
{
|
||||
name: 'expiration',
|
||||
value: new Date(now.getTime() + this.expire * 1000;
|
||||
value: new Date(now.getTime() + this.expire * 1000)
|
||||
}
|
||||
]
|
||||
};
|
||||
|
@ -87,6 +87,7 @@ class GoogleDatastoreDocumentStore {
|
|||
winston.error("Error retrieving value from Google Datastore", {error: err});
|
||||
callback(false);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = GoogleDatastoreDocumentStore;
|
||||
|
|
Loading…
Reference in a new issue