Compare commits

..

No commits in common. "main" and "base-v1.0.0" have entirely different histories.

3 changed files with 8 additions and 10 deletions

View File

@ -1,12 +1,12 @@
version: bwc/v2 # bwc 버전 정보입니다. version: bwc/v2 # bwc 버전 정보입니다.
spec: spec:
appName: app-test # 앱의 이름입니다. appName: mqtt-s3-sdt-sdk-template # 앱의 이름입니다.
runFile: main.py # 앱의 실행 파일입니다. runFile: main.py # 앱의 실행 파일입니다.
env: env:
bin: python3 bin: python3 # 앱을 실행할 바이너라 파일 종류입니다.(장비에 따라 다르므로 확인 후 정의해야 합니다.)
virtualEnv: mqtt-s3-env # 사용할 가상환경 이름입니다. virtualEnv: mqtt-s3-env # 사용할 가상환경 이름입니다.
package: requirements.txt # 설치할 Python 패키지 정보 파일입니다.(기본 값은 requirement.txt 입니다.) package: requirement.txt # 설치할 Python 패키지 정보 파일입니다.(기본 값은 requirement.txt 입니다.)
runtime: python3.9
stackbase: stackbase:
tagName: v1.0.3 # Stackbase(gitea)에 릴리즈 태그명 입니다. userName: sujune@sdt.inc # Stackbase(gitea) ID 입니다.
tagName: v1.0.0 # Stackbase(gitea)에 릴리즈 태그명 입니다.
repoName: mqtt-s3-sdt-sdk-template # Stackbase(gitea)에 저장될 저장소 이릅니다. repoName: mqtt-s3-sdt-sdk-template # Stackbase(gitea)에 저장될 저장소 이릅니다.

View File

@ -5,12 +5,10 @@ import uuid
# call sdtcloudpubsub # call sdtcloudpubsub
sdtcloudMqttClient = sdtcloudpubsub.sdtcloudpubsub() sdtcloudMqttClient = sdtcloudpubsub.sdtcloudpubsub()
sdtcloudMqttClient.setClient(f"device-app-{uuid.uuid1()}") # parameter is client ID(string) mqttClient = sdtcloudMqttClient.setClient(f"device-app-{uuid.uuid1()}") # parameter is client ID(string)
# call sdtclouds3 # call sdtclouds3
S3Id = "" # your S3 AWS Access Key sdtcloudS3Client = sdtclouds3.sdtclouds3()
S3Key = "" # your S3 AWS Access Sercet Key
sdtcloudS3Client = sdtclouds3.sdtclouds3(S3Id, S3Key)
@ -22,7 +20,7 @@ def runAction():
"message": "Hello World", "message": "Hello World",
"uploadFile": result "uploadFile": result
} }
sdtcloudMqttClient.pubMessage(msg) sdtcloudMqttClient.pubMessage(mqttClient, msg)
time.sleep(10) time.sleep(10)
if __name__ == "__main__": if __name__ == "__main__":