소스 검색

pass result in monitored functions

dev_h
lovasoa 4 년 전
부모
커밋
5ca8e516c1
No account linked to committer's email address
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2
    1
      server/log.js

+ 2
- 1
server/log.js 파일 보기

@@ -64,8 +64,9 @@ function monitorFunction(f) {
64 64
   return function () {
65 65
     let startTime = new Date();
66 66
     try {
67
-      f.apply(null, arguments);
67
+      const result = f.apply(null, arguments);
68 68
       client.increment("ok", 1);
69
+      return result;
69 70
     } catch (e) {
70 71
       client.increment("err", 1);
71 72
       throw e;

Loading…
취소
저장