SIENTIAPDE-1049
Update ingestor and data manager for improved shutdown handling and logging - Incremented project version in quality gate configuration. - Commented out ingestor service in docker-compose for clarity. - Enhanced main loop in app.py to handle exit signals and exceptions. - Added shutdown methods in Ingestor and DataManager classes for graceful resource cleanup. - Updated unit tests to validate shutdown behavior and exception handling. - Introduced coverage configuration to omit specific files.
This commit is contained in:
@@ -1,14 +1,18 @@
|
||||
import redis
|
||||
import json
|
||||
import os
|
||||
|
||||
# Redis connection settings
|
||||
redis_host = "localhost"
|
||||
redis_port = 6379
|
||||
REDIS_HOST = "localhost"
|
||||
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"
|
||||
|
||||
# Connect to Redis
|
||||
r = redis.Redis(host=redis_host, port=redis_port,
|
||||
decode_responses=True, username='default', password='bdnZOpcyiL')
|
||||
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:*"
|
||||
@@ -25,7 +29,7 @@ new_data = {
|
||||
"slot:opc_tags:1": {
|
||||
"server1": {
|
||||
"name": "server1",
|
||||
"url": "opc.tcp://sientia-opc-simulator-service.sientia-opc.svc.cluster.local:4840",
|
||||
"url": OPC_URL,
|
||||
"server_uri": "http://opcua-server.simulator",
|
||||
"tags": {
|
||||
'ns=2;i=2': {
|
||||
|
||||
Reference in New Issue
Block a user