SIENTIAPDE-1094

Update settings for language services, adjust simulator port, enhance error handling in ingestor, and refine Redis feeder script
This commit is contained in:
vitor-aignosi
2025-06-09 08:42:22 -03:00
parent 112d512a02
commit 1af7e80e5b
6 changed files with 30 additions and 18 deletions

View File

@@ -1,5 +1,6 @@
import redis
import json
import redis
# Redis connection settings
REDIS_HOST = "localhost"
@@ -7,19 +8,19 @@ REDIS_PORT = 6379
REDIS_USERNAME = None # "default"
REDIS_PASSWORD = None # "bdnZOpcyiL"
OPC_URL = "opc.tcp://sientia-opc-simulator-service.sientia-opc.svc.cluster.local:4840"
OPC_URL = "opc.tcp://localhost:4840"
OPC_URL = "opc.tcp://sientia-opc-simulator-service.sientia-opc.svc.cluster.local:4841"
OPC_URL = "opc.tcp://localhost:4841"
# Connect to Redis
r = redis.Redis(host=REDIS_HOST, port=REDIS_PORT,
decode_responses=True, username=REDIS_USERNAME, password=REDIS_PASSWORD)
# Define the key pattern to target
pattern = "slot:opc_tags:*"
PATTERN = "slot:opc_tags:*"
# Step 1: Find and delete matching keys
print("🔍 Searching for keys matching:", pattern)
for key in r.scan_iter(match=pattern):
print("🔍 Searching for keys matching:", PATTERN)
for key in r.scan_iter(match=PATTERN):
r.delete(key)
print(f"❌ Deleted: {key}")