added environment variable for expire time

This commit is contained in:
Danny Coates 2017-07-24 13:07:49 -07:00
parent fa1f0208a4
commit 4cb040d70d
No known key found for this signature in database
GPG key ID: 4C442633C62E00CB
6 changed files with 12 additions and 5 deletions

View file

@ -152,7 +152,7 @@ function localSet(newId, file, filename, meta) {
});
fstream.on('finish', () => {
redis_client.hmset(newId, meta);
redis_client.expire(newId, 86400000);
redis_client.expire(newId, conf.expire_seconds);
log.info('localSet:', 'Upload Finished of ' + newId);
resolve(meta.delete);
});
@ -238,7 +238,7 @@ function awsSet(newId, file, filename, meta) {
return upload.promise().then(
() => {
redis_client.hmset(newId, meta);
redis_client.expire(newId, 86400000);
redis_client.expire(newId, conf.expire_seconds);
log.info('awsUploadFinish', 'Upload Finished of ' + filename);
},
err => {