tonykang22 / hello-world-auto-store

3 stars 1 forks source link

[product-analyzer] Select-score 배치 성능 개선 #186

Open tonykang22 opened 1 year ago

tonykang22 commented 1 year ago

Select-score 배치 성능 개선

개요



Cloud Functions

Cloud Functions란?

image

Reference : https://guide.ncloud-docs.com/docs/cloudfunctions-overview



Idea



Public IP Check

Java


이슈 발생

{
  "response": {
    "status": "action developer error",
    "result": {
      "error": "The action did not initialize and exited unexpectedly."
    }
  }
}



Python

import socket
import requests
import json

def send_slack_message(message):
  postResult = requests.post("https://hooks.slack.com/services/CLASSIFIED", json.dumps({"text":message}))

def main(arg):
  message = "Host Name " + socket.gethostname() + "IP Address(Internal) : " + socket.gethostbyname(socket.gethostname())
  send_slack_message(message)



image

private IP만 확인할 수 있었다. 짧은 시간 내에 수행된 결과로, 인스턴스를 식별하는 지표로 사용할 수 있었다.



import socket
import requests
import json
import time

def send_slack_message(message):
  postResult = requests.post("https://hooks.slack.com/services/CLASSIFIED", json.dumps({"text":message}))
  time.sleep(100)

def main(arg):
  message = "Host Name " + socket.gethostname() + "IP Address(Internal) : " + socket.gethostbyname(socket.gethostname())
  send_slack_message(message)

image



중간 결론

tonykang22 commented 1 year ago

이슈