From 84f6d9341f94cabae4b940544e2c0fbe1476879e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=9D=B4=EC=88=98=EC=A4=80?= Date: Thu, 12 Oct 2023 09:53:29 +0900 Subject: [PATCH] FIX: fix test code --- main.py | 7 ++++--- text.txt | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/main.py b/main.py index 35fb529..281f1b4 100644 --- a/main.py +++ b/main.py @@ -17,10 +17,10 @@ with open(f'/usr/local/sdt/app/{args.config}/config.yaml', encoding='UTF-8') as # mqttc = mqtt.Client() # puclisher 이름 # mqttc.username_pw_set("sdt", "251327") # mqttc.connect("13.209.39.139", 32259) -f = open(f'/usr/local/sdt/app/{args.config}/text.txt') -# f = open(f'./text.txt', 'w') +# f = open(f'/usr/local/sdt/app/{args.config}/text.txt') +f = open(f'/home/sdt-dev1/text.txt', 'w') while True: - f.write(f"Config value: {yamlData['topic']} \n") + f.write(f"Config value: {yamlData['topic']}\n") # print(f"Config value: {yamlData['topic']}") # dataList = [] # for n in range(10): @@ -39,3 +39,4 @@ while True: # "data": dataList # }) # mqttc.publish(f"/device-test/{yamlData['topic']}", datas) # topic, message +f.close() \ No newline at end of file diff --git a/text.txt b/text.txt index e16f8e7..85053a6 100644 --- a/text.txt +++ b/text.txt @@ -1 +1 @@ -TEST!!! +TEST!!!hi