Advertisement
Guest User

Untitled

a guest
Nov 15th, 2019
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. async insertCSHealthCheck(connMsg) {
  2. const { connection, cert } = getConfig().postgresConf.cshealthcheck;
  3. clog.info('connection --> ' + connection)
  4. const postgresCS = new Postgres(connection, cert);
  5. const query = `INSERT INTO cs_health_check(id,org,info,is_send)
  6. VALUES('${connMsg.csHealthCheckID}','${connMsg.orgID}','${JSON.stringify((connMsg))}',false)`;
  7. clog.debug(query);
  8. // await postgresCS.client.connect();
  9. const { rowCount } = await postgresCS.client.query(query);
  10. // await postgresCS.client.end();
  11. return rowCount;
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement