test DB
This commit is contained in:
		
							parent
							
								
									a93bb0a26c
								
							
						
					
					
						commit
						cf247b8d47
					
				| 
						 | 
					@ -56,32 +56,34 @@ const sendNotification = async () => {
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
    setTimeout(async () => {
 | 
					    setTimeout(async () => {
 | 
				
			||||||
      console.log({ auto1: auto1, auto2: auto2, log: log });
 | 
					      console.log({ auto1: auto1, auto2: auto2, log: log });
 | 
				
			||||||
      let params = {
 | 
					      
 | 
				
			||||||
        type: "stream",
 | 
					 | 
				
			||||||
        to: "Result test - auto.nswteam.net",
 | 
					 | 
				
			||||||
        topic: "AU-dev",
 | 
					 | 
				
			||||||
        content: process.argv[2],
 | 
					 | 
				
			||||||
      };
 | 
					 | 
				
			||||||
  
 | 
					 | 
				
			||||||
      client.messages.send(params);
 | 
					 | 
				
			||||||
      if (process.argv[2] === "interval") {
 | 
					      if (process.argv[2] === "interval") {
 | 
				
			||||||
        if (log === "") {
 | 
					        if (log === "") {
 | 
				
			||||||
          exec("pm2 restart all", (error, stdout, stderr) => {
 | 
					          exec("pm2 restart all", (error, stdout, stderr) => {
 | 
				
			||||||
            if (error) {
 | 
					            if (error) {
 | 
				
			||||||
              return;
 | 
					              return;
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
            console.log("RESTART: ", stdout);
 | 
					            // console.log("RESTART: ", stdout);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            let content = "Server die! Restart ...";
 | 
					            // let content = "Server die! Restart ...";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            // let params = {
 | 
				
			||||||
 | 
					            //   type: "stream",
 | 
				
			||||||
 | 
					            //   to: "Result test - auto.nswteam.net",
 | 
				
			||||||
 | 
					            //   topic: "AU-dev",
 | 
				
			||||||
 | 
					            //   content: content,
 | 
				
			||||||
 | 
					            // };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            // client.messages.send(params);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            let params = {
 | 
					            let params = {
 | 
				
			||||||
              type: "stream",
 | 
					                type: "stream",
 | 
				
			||||||
              to: "Result test - auto.nswteam.net",
 | 
					                to: "Result test - auto.nswteam.net",
 | 
				
			||||||
              topic: "AU-dev",
 | 
					                topic: "AU-dev",
 | 
				
			||||||
              content: content,
 | 
					                content: process.argv[2],
 | 
				
			||||||
            };
 | 
					              };
 | 
				
			||||||
 | 
					          
 | 
				
			||||||
            client.messages.send(params);
 | 
					              client.messages.send(params);
 | 
				
			||||||
          });
 | 
					          });
 | 
				
			||||||
        } else {
 | 
					        } else {
 | 
				
			||||||
          console.log("server good");
 | 
					          console.log("server good");
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue