Commit 3581c7c
committed
refactor: streamline Telegram bot event handling and integrate logging
- Removed unused HttpModule and CqrsModule imports from telegram-bot.module.ts.
- Updated NodesEvents and UsersEvents classes to replace direct bot message sending with a logging queue service for better message handling.
- Refactored webhook event processing to utilize a dedicated logging service, enhancing maintainability and separation of concerns.
- Introduced new queue names for Telegram and webhook logging in queue.enum.ts.
- Adjusted job intervals for user traffic resets in intervals.ts for improved scheduling accuracy.1 parent e63c5e1 commit 3581c7c
File tree
36 files changed
+493
-128
lines changed- src
- integration-modules
- telegram-bot
- events
- nodes
- users
- webhook-module
- events
- modules
- inbounds/commands
- create-many-inbounds
- delete-many-active-inbounds-by-user-uuid
- nodes-user-usage-history/commands/bulk-upsert-user-history-entry
- users/commands
- batch-reset-limited-users-traffic
- batch-reset-user-traffic
- bulk-increment-used-traffic
- change-user-status
- increment-used-traffic
- reset-user-traffic
- update-exceeded-users
- update-expired-users
- update-user-with-service
- queue
- loggers
- telegram-bot-logger
- enums
- webhook-logger
- enums
- interfaces
- reset-user-traffic
- scheduler
36 files changed
+493
-128
lines changedLines changed: 38 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | | - | |
| 2 | + | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
13 | 16 | | |
14 | 17 | | |
15 | 18 | | |
16 | 19 | | |
17 | 20 | | |
18 | 21 | | |
19 | 22 | | |
20 | | - | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
21 | 26 | | |
22 | 27 | | |
23 | 28 | | |
24 | 29 | | |
25 | | - | |
26 | 30 | | |
27 | 31 | | |
28 | 32 | | |
| |||
34 | 38 | | |
35 | 39 | | |
36 | 40 | | |
37 | | - | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
38 | 45 | | |
39 | 46 | | |
40 | 47 | | |
| |||
46 | 53 | | |
47 | 54 | | |
48 | 55 | | |
49 | | - | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
50 | 60 | | |
51 | 61 | | |
52 | 62 | | |
| |||
58 | 68 | | |
59 | 69 | | |
60 | 70 | | |
61 | | - | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
62 | 75 | | |
63 | 76 | | |
64 | 77 | | |
65 | 78 | | |
66 | 79 | | |
67 | | - | |
| 80 | + | |
68 | 81 | | |
69 | 82 | | |
70 | 83 | | |
71 | 84 | | |
72 | 85 | | |
73 | | - | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
74 | 90 | | |
75 | 91 | | |
76 | 92 | | |
| |||
84 | 100 | | |
85 | 101 | | |
86 | 102 | | |
87 | | - | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
88 | 107 | | |
89 | 108 | | |
90 | 109 | | |
| |||
98 | 117 | | |
99 | 118 | | |
100 | 119 | | |
101 | | - | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
102 | 124 | | |
103 | 125 | | |
104 | 126 | | |
| |||
116 | 138 | | |
117 | 139 | | |
118 | 140 | | |
119 | | - | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
120 | 145 | | |
121 | 146 | | |
Lines changed: 45 additions & 17 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | | - | |
| 2 | + | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
13 | 16 | | |
14 | 17 | | |
15 | 18 | | |
16 | 19 | | |
17 | 20 | | |
18 | 21 | | |
19 | 22 | | |
20 | | - | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
21 | 26 | | |
22 | 27 | | |
23 | 28 | | |
24 | | - | |
25 | 29 | | |
26 | 30 | | |
27 | 31 | | |
| |||
31 | 35 | | |
32 | 36 | | |
33 | 37 | | |
34 | | - | |
| 38 | + | |
35 | 39 | | |
36 | 40 | | |
37 | 41 | | |
38 | | - | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
39 | 46 | | |
40 | 47 | | |
41 | 48 | | |
| |||
45 | 52 | | |
46 | 53 | | |
47 | 54 | | |
48 | | - | |
| 55 | + | |
49 | 56 | | |
50 | 57 | | |
51 | 58 | | |
52 | | - | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
53 | 63 | | |
54 | 64 | | |
55 | 65 | | |
| |||
59 | 69 | | |
60 | 70 | | |
61 | 71 | | |
62 | | - | |
| 72 | + | |
63 | 73 | | |
64 | 74 | | |
65 | 75 | | |
66 | | - | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
67 | 80 | | |
68 | 81 | | |
69 | 82 | | |
70 | 83 | | |
71 | 84 | | |
72 | | - | |
| 85 | + | |
73 | 86 | | |
74 | 87 | | |
75 | 88 | | |
76 | | - | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
77 | 93 | | |
78 | 94 | | |
79 | 95 | | |
| |||
83 | 99 | | |
84 | 100 | | |
85 | 101 | | |
86 | | - | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
87 | 106 | | |
88 | 107 | | |
89 | 108 | | |
| |||
93 | 112 | | |
94 | 113 | | |
95 | 114 | | |
96 | | - | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
97 | 119 | | |
98 | 120 | | |
99 | 121 | | |
| |||
103 | 125 | | |
104 | 126 | | |
105 | 127 | | |
106 | | - | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
107 | 132 | | |
108 | 133 | | |
109 | 134 | | |
| |||
113 | 138 | | |
114 | 139 | | |
115 | 140 | | |
116 | | - | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
117 | 145 | | |
118 | 146 | | |
Lines changed: 0 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | | - | |
6 | 4 | | |
7 | 5 | | |
8 | 6 | | |
| |||
11 | 9 | | |
12 | 10 | | |
13 | 11 | | |
14 | | - | |
15 | | - | |
16 | 12 | | |
17 | 13 | | |
18 | 14 | | |
| |||
0 commit comments