mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2024-11-10 01:02:30 +01:00
Change status timeout
This commit is contained in:
parent
af31f511a5
commit
dc2115ef20
1 changed files with 2 additions and 2 deletions
|
@ -13,7 +13,7 @@ export async function getStatus(req: Request, res: Response): Promise<Response>
|
|||
let processTime, redisProcessTime = -1;
|
||||
try {
|
||||
const dbStartTime = Date.now();
|
||||
const dbVersion = await promiseOrTimeout(db.prepare("get", "SELECT key, value FROM config where key = ?", ["version"]), 5000)
|
||||
const dbVersion = await promiseOrTimeout(db.prepare("get", "SELECT key, value FROM config where key = ?", ["version"]), 1000)
|
||||
.then(e => {
|
||||
processTime = Date.now() - dbStartTime;
|
||||
return e.value;
|
||||
|
@ -24,7 +24,7 @@ export async function getStatus(req: Request, res: Response): Promise<Response>
|
|||
});
|
||||
let statusRequests: unknown = 0;
|
||||
const redisStartTime = Date.now();
|
||||
const numberRequests = await promiseOrTimeout(redis.increment("statusRequest"), 5000)
|
||||
const numberRequests = await promiseOrTimeout(redis.increment("statusRequest"), 1000)
|
||||
.then(e => {
|
||||
redisProcessTime = Date.now() - redisStartTime;
|
||||
return e;
|
||||
|
|
Loading…
Reference in a new issue