Skip to content
Snippets Groups Projects
Commit 4c4af2ae authored by syuilo's avatar syuilo
Browse files

clean up

parent c3a36698
No related branches found
No related tags found
No related merge requests found
...@@ -290,7 +290,6 @@ export class ApiCallService implements OnApplicationShutdown { ...@@ -290,7 +290,6 @@ export class ApiCallService implements OnApplicationShutdown {
} }
// API invoking // API invoking
const before = performance.now();
return await ep.exec(data, user, token, file, request.ip, request.headers).catch((err: Error) => { return await ep.exec(data, user, token, file, request.ip, request.headers).catch((err: Error) => {
if (err instanceof ApiError) { if (err instanceof ApiError) {
throw err; throw err;
...@@ -313,12 +312,6 @@ export class ApiCallService implements OnApplicationShutdown { ...@@ -313,12 +312,6 @@ export class ApiCallService implements OnApplicationShutdown {
}, },
}); });
} }
}).finally(() => {
const after = performance.now();
const time = after - before;
if (time > 1000) {
this.logger.warn(`SLOW API CALL DETECTED: ${ep.name} (${time}ms)`);
}
}); });
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment