SHARE
TWEET

Untitled

a guest Nov 8th, 2019 75 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var net = require("net")
  2.  
  3. exports.handler = function(event, context) {
  4.     net.connect({
  5.         port: 5439,
  6.         host: '10.116.6.32'
  7.     }, 
  8.     function(err,data) {
  9.         if (err) {
  10.             console.log("site1 socket failure");
  11.             context.fail();
  12.         } else {
  13.             console.log("site1 socket success");
  14.             net.connect({
  15.                 port: 5439,
  16.                 host: 'analytics.cqwnz0mozlxa.us-west-2.redshift.amazonaws.com'
  17.             }, 
  18.             function (err,data) {
  19.                 if (err) {
  20.                     console.log("site1 dns failure");
  21.                     context.fail();
  22.                 } else {
  23.                     console.log("site1 dns success");
  24.                     context.succeed();
  25.                 }
  26.             })
  27.         }
  28.     });
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top