904118851 8 kuukautta sitten
vanhempi
sitoutus
72cf6e0dfb
9 muutettua tiedostoa jossa 8 lisäystä ja 27 poistoa
  1. 1 2
      .gitignore
  2. 1 0
      deletepm2.sh
  3. 0 19
      nohup.out
  4. 1 1
      run.sh
  5. 3 3
      src/1recv_data/recv_server.js
  6. BIN
      src/api/hy/qr.gif
  7. BIN
      src/api/hy/qr_resized.gif
  8. 1 1
      src/use_redis.js
  9. 1 1
      start_run.sh

+ 1 - 2
.gitignore

@@ -1,3 +1,2 @@
 nohup.out
-src/api/hy/qr.gif
-
+src/api/hy/qr.gif

+ 1 - 0
deletepm2.sh

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

+ 0 - 19
nohup.out

@@ -1,19 +0,0 @@
-kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec]
-[PM2] Spawning PM2 daemon with pm2_home=/root/.pm2
-[PM2] PM2 Successfully daemonized
-[PM2] Starting /home/tg_create_link/start_data.js in fork_mode (1 instance)
-[PM2] Done.
-┌────┬───────────────┬─────────────┬─────────┬─────────┬──────────┬────────┬──────┬───────────┬──────────┬──────────┬──────────┬──────────┐
-│ id │ name          │ namespace   │ version │ mode    │ pid      │ uptime │ ↺    │ status    │ cpu      │ mem      │ user     │ watching │
-├────┼───────────────┼─────────────┼─────────┼─────────┼──────────┼────────┼──────┼───────────┼──────────┼──────────┼──────────┼──────────┤
-│ 0  │ start_data    │ default     │ 1.0.0   │ fork    │ 16723    │ 0s     │ 0    │ online    │ 0%       │ 25.5mb   │ root     │ disabled │
-└────┴───────────────┴─────────────┴─────────┴─────────┴──────────┴────────┴──────┴───────────┴──────────┴──────────┴──────────┴──────────┘
-[PM2][WARN] Current process list is not synchronized with saved list. App start start_novel differs. Type 'pm2 save' to synchronize.
-[PM2] Applying action restartProcessId on app [start_data](ids: [ 0 ])
-[PM2] [start_data](0) ✓
-[PM2] Process successfully started
-┌────┬───────────────┬─────────────┬─────────┬─────────┬──────────┬────────┬──────┬───────────┬──────────┬──────────┬──────────┬──────────┐
-│ id │ name          │ namespace   │ version │ mode    │ pid      │ uptime │ ↺    │ status    │ cpu      │ mem      │ user     │ watching │
-├────┼───────────────┼─────────────┼─────────┼─────────┼──────────┼────────┼──────┼───────────┼──────────┼──────────┼──────────┼──────────┤
-│ 0  │ start_data    │ default     │ 1.0.0   │ fork    │ 11374    │ 0s     │ 8108 │ online    │ 0%       │ 8.5mb    │ root     │ disabled │
-└────┴───────────────┴─────────────┴─────────┴─────────┴──────────┴────────┴──────┴───────────┴──────────┴──────────┴──────────┴──────────┘

+ 1 - 1
run.sh

@@ -1,3 +1,3 @@
 lsof -i :9101 | grep LISTEN | awk '{print $2}' | xargs sudo kill -9
 sleep 1
-/home/node/node-v20.17.0-linux-x64/lib/node_modules/pm2/bin/pm2 start start_data.js
+nohup /home/node/node-v20.17.0-linux-x64/lib/node_modules/pm2/bin/pm2 start start_data.js

+ 3 - 3
src/1recv_data/recv_server.js

@@ -70,12 +70,12 @@ var server = http.createServer(function(req,res){
     });
 
 })
+server.listen(PROT,()=>{
 
+});  
 sql_help.connect((results)=>{
     if(results){
-        server.listen(PROT,()=>{
-
-        });        
+      
     }
 })
 

BIN
src/api/hy/qr.gif


BIN
src/api/hy/qr_resized.gif


+ 1 - 1
src/use_redis.js

@@ -24,7 +24,7 @@
     }
 
     redis_help.setKeyValue = function(key, value) {
-        return client.set(key, value).then((status)=>{
+        return client.set(key, value+"").then((status)=>{
             if(status=="OK"){
                 // console.log("写入成功!",status,key,value)
             }else{

+ 1 - 1
start_run.sh

@@ -1,3 +1,3 @@
 lsof -i :9101 | grep LISTEN | awk '{print $2}' | xargs sudo kill -9
 sleep 1
-node start_data.js
+nohup node start_data.js