From cf6372e81a57b286805696a93a237e245b16adb0 Mon Sep 17 00:00:00 2001 From: Flook Date: Sun, 25 May 2025 05:14:31 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B8=9B=E0=B8=A3=E0=B8=B1=E0=B8=9A=E0=B8=9B?= =?UTF-8?q?=E0=B8=A3=E0=B8=B8=E0=B8=87=E0=B9=82=E0=B8=84=E0=B9=89=E0=B8=94?= =?UTF-8?q?=E0=B9=80=E0=B8=A5=E0=B9=87=E0=B8=81=E0=B8=99=E0=B9=89=E0=B8=AD?= =?UTF-8?q?=E0=B8=A2=20=E0=B9=81=E0=B8=A5=E0=B8=B0=E0=B8=A2=E0=B9=89?= =?UTF-8?q?=E0=B8=B2=E0=B8=A2=E0=B8=97=E0=B8=B5=E0=B9=88=E0=B8=AD=E0=B8=A2?= =?UTF-8?q?=E0=B8=B9=E0=B9=88=20Dashboard?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- pipelines/predict_and_store.py | 2 +- pipelines/send_to_kafka.py | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 473cff8..445286e 100644 --- a/README.md +++ b/README.md @@ -73,7 +73,7 @@ ## 📈 ตัวอย่าง Dashboard ตัวอย่างการสร้าง Dashboard ที่แสดงข้อมูลคุณภาพอากาศและการทำนาย AQI ในอนาคตโดยใช้ข้อมูลจาก ClickHouse และ AI สนับสนุน Data-driven decision: -https://metabase.softwarecraft.tech/public/dashboard/bb9e4187-f60e-46f2-ba79-5e220ebe0684 +https://analytics.softwarecraft.tech/public/dashboard/0107425a-50aa-4fd6-8d78-d29f4c9d76ae --- diff --git a/pipelines/predict_and_store.py b/pipelines/predict_and_store.py index 82eb15b..f25e653 100644 --- a/pipelines/predict_and_store.py +++ b/pipelines/predict_and_store.py @@ -36,7 +36,7 @@ def predict_aqi(latest_record): from requests.auth import HTTPBasicAuth # อ่านค่าจาก .env - mindsdb_api_url = os.getenv("MINDSDB_REST_API_URL", "https://mindsdb.softwarecraft.tech/api/projects/mindsdb/models/aqi_forecaster/predict") + mindsdb_api_url = os.getenv("MINDSDB_REST_API_URL") mindsdb_user = os.getenv("MINDSDB_USER") mindsdb_pass = os.getenv("MINDSDB_PASSWORD") diff --git a/pipelines/send_to_kafka.py b/pipelines/send_to_kafka.py index 1f03be5..3157313 100644 --- a/pipelines/send_to_kafka.py +++ b/pipelines/send_to_kafka.py @@ -6,7 +6,8 @@ from requests.auth import HTTPBasicAuth load_dotenv() -KAFKA_REST_PROXY = "https://kafka-rest-proxy.softwarecraft.tech" # เปลี่ยนให้เป็น https:// +# ใช้ environment variable แทน hardcoded URL +KAFKA_REST_PROXY = os.getenv("KAFKA_REST_PROXY_URL") auth = HTTPBasicAuth(os.getenv('KAFKA_API_USER'), os.getenv('KAFKA_API_PASS')) def send_to_kafka(topic, data):