904118851 7 luni în urmă
părinte
comite
3d87b8803e

+ 1 - 1
5_CREATE_LINK_FACTORY/fqmf_create_link.js

@@ -29,7 +29,7 @@ CMD.runTask = async function(data,main_info,PlatformInfo,call_back){
         for (let index = 0; index < kadian_list.length; index++) {
             const kd_obj = kadian_list[index];
             if(kd_obj.id==kadian_id){
-                kadian_value = kd_obj.value
+                kadian_value = kd_obj.name
               break
             }
         }

+ 6 - 1
MAIN_SERVE_FACTORY/MAIN_SERVE_FACTORY.js

@@ -97,7 +97,12 @@ const messageHandler = async (msg) => {
     total = 0;
     isStartTask = true
     let main_info = msg['data']['data'].main_info
-    tg_platform_id = main_info.tg_platform_id
+    console.log("main_info:",main_info)
+    if(main_info.parent_platform_id!=0){
+        tg_platform_id = main_info.parent_platform_id
+    }else{
+        tg_platform_id = main_info.tg_platform_id
+    }
     await redis_help.setKeyValue("isPauseTask","true") 
     await processTask(tg_platform_id,main_info)
 };

BIN
dump.rdb


+ 1 - 1
etc/config.json

@@ -1,5 +1,5 @@
 {
-    "isDebug":false,
+    "isDebug":true,
     "redis_config": {
         "host": "127.0.0.1",
         "port": 6379

+ 25 - 0
logs/combined.log

@@ -2,3 +2,28 @@
 2025-01-10T14:46:41: > heiyan@1.0.0 start
 2025-01-10T14:46:41: > node tg_factory_main.js
 2025-01-10T14:46:41: 
+2025-01-10T15:40:47: 
+2025-01-10T15:40:47: > heiyan@1.0.0 start
+2025-01-10T15:40:47: > node tg_factory_main.js
+2025-01-10T15:40:47: 
+2025-01-10T15:40:50: Connected to Redis
+2025-01-10T16:47:14: 
+2025-01-10T16:47:14: > heiyan@1.0.0 start
+2025-01-10T16:47:14: > node tg_factory_main.js
+2025-01-10T16:47:14: 
+2025-01-10T16:47:17: Connected to Redis
+2025-01-10T16:49:38: 
+2025-01-10T16:49:38: > heiyan@1.0.0 start
+2025-01-10T16:49:38: > node tg_factory_main.js
+2025-01-10T16:49:38: 
+2025-01-10T16:49:41: Connected to Redis
+2025-01-10T16:51:49: 
+2025-01-10T16:51:49: > heiyan@1.0.0 start
+2025-01-10T16:51:49: > node tg_factory_main.js
+2025-01-10T16:51:49: 
+2025-01-10T16:51:52: Connected to Redis
+2025-01-10T18:07:58: 
+2025-01-10T18:07:58: > heiyan@1.0.0 start
+2025-01-10T18:07:58: > node tg_factory_main.js
+2025-01-10T18:07:58: 
+2025-01-10T18:08:01: Connected to Redis

+ 25 - 0
logs/out.log

@@ -2,3 +2,28 @@
 2025-01-10T14:46:41: > heiyan@1.0.0 start
 2025-01-10T14:46:41: > node tg_factory_main.js
 2025-01-10T14:46:41: 
+2025-01-10T15:40:47: 
+2025-01-10T15:40:47: > heiyan@1.0.0 start
+2025-01-10T15:40:47: > node tg_factory_main.js
+2025-01-10T15:40:47: 
+2025-01-10T15:40:50: Connected to Redis
+2025-01-10T16:47:14: 
+2025-01-10T16:47:14: > heiyan@1.0.0 start
+2025-01-10T16:47:14: > node tg_factory_main.js
+2025-01-10T16:47:14: 
+2025-01-10T16:47:17: Connected to Redis
+2025-01-10T16:49:38: 
+2025-01-10T16:49:38: > heiyan@1.0.0 start
+2025-01-10T16:49:38: > node tg_factory_main.js
+2025-01-10T16:49:38: 
+2025-01-10T16:49:41: Connected to Redis
+2025-01-10T16:51:49: 
+2025-01-10T16:51:49: > heiyan@1.0.0 start
+2025-01-10T16:51:49: > node tg_factory_main.js
+2025-01-10T16:51:49: 
+2025-01-10T16:51:52: Connected to Redis
+2025-01-10T18:07:58: 
+2025-01-10T18:07:58: > heiyan@1.0.0 start
+2025-01-10T18:07:58: > node tg_factory_main.js
+2025-01-10T18:07:58: 
+2025-01-10T18:08:01: Connected to Redis

+ 1 - 0
restart.sh

@@ -0,0 +1 @@
+/home/node/node-v20.17.0-linux-x64/lib/node_modules/pm2/bin/pm2 restart $1

+ 1 - 54
src/ProxyService.js

@@ -62,7 +62,7 @@ class ProxyService {
     }
 
     // 添加重试机制
-    async proxyRequestWithRetry(options, maxRetries = 3, delay = 1000) {
+    async proxyRequestWithRetry(options, maxRetries = 3, delay = 3000) {
         for (let i = 0; i < maxRetries; i++) {
             try {
                 return await this.proxyRequest(options);
@@ -76,57 +76,4 @@ class ProxyService {
     }
 }
 
-// 使用示例
-// async function example() {
-//     const proxyService = new ProxyService();
-    
-//     try {
-//         const result = await proxyService.proxyRequestWithRetry({
-//             url: 'https://api.example.com/data',
-//             method: 'post',
-//             headers: {
-//                 'Content-Type': 'application/json'
-//             },
-//             data: {
-//                 key: 'value'
-//             }
-//         });
-        
-//         console.log('Success:', result);
-//     } catch (error) {
-//         console.error('Final error:', error);
-//     }
-// }
-
-// // 批量请求处理
-// class BatchProxyRequests {
-//     constructor(proxyService) {
-//         this.proxyService = proxyService;
-//         this.queue = [];
-//         this.concurrency = 3; // 并发数
-//     }
-
-//     addRequest(options) {
-//         this.queue.push(options);
-//     }
-
-//     async processBatch() {
-//         const results = [];
-        
-//         while (this.queue.length > 0) {
-//             const batch = this.queue.splice(0, this.concurrency);
-//             const promises = batch.map(options => 
-//                 this.proxyService.proxyRequestWithRetry(options)
-//                     .catch(error => ({ error }))
-//             );
-            
-//             const batchResults = await Promise.all(promises);
-//             results.push(...batchResults);
-//         }
-        
-//         return results;
-//     }
-// }
-
-
 module.exports = ProxyService;

BIN
src/api/hy/qr.gif


BIN
src/api/hy/qr_resized.gif


+ 2 - 1
stopAll.sh

@@ -12,4 +12,5 @@
 /home/node/node-v20.17.0-linux-x64/lib/node_modules/pm2/bin/pm2 stop HY_FACTORY
 /home/node/node-v20.17.0-linux-x64/lib/node_modules/pm2/bin/pm2 stop QM_FACTORY
 /home/node/node-v20.17.0-linux-x64/lib/node_modules/pm2/bin/pm2 stop PULL_TIME_DATA
-/home/node/node-v20.17.0-linux-x64/lib/node_modules/pm2/bin/pm2 stop WX_GUA_JIAN_PARSE
+/home/node/node-v20.17.0-linux-x64/lib/node_modules/pm2/bin/pm2 stop WX_GUA_JIAN_PARSE
+