fix
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Timo Hocker 2022-08-10 16:18:05 +02:00
parent b43190d048
commit 43cf782511
No known key found for this signature in database
GPG Key ID: 3B86485AC71C835C

View File

@ -60,7 +60,8 @@ export class Redis {
return; return;
} }
const valid_for = Math.floor ( const valid_for = Math.floor (
(key.valid_until - new Date().getTime()) / 1000 (key.valid_until - (new Date)
.getTime ()) / 1000
); );
log ('key is valid for %d seconds', valid_for); log ('key is valid for %d seconds', valid_for);
await this._redis.setex (key.index, valid_for, JSON.stringify (key)); await this._redis.setex (key.index, valid_for, JSON.stringify (key));
@ -84,4 +85,4 @@ export class Redis {
} }
} }
export const redis = new Redis(); export const redis = (new Redis);