Other insignificant tweaks

This commit is contained in:
2026-02-26 19:49:46 +01:00
parent 3092d795e7
commit fab9c3fafa
3 changed files with 27 additions and 17 deletions

View File

@@ -29,6 +29,13 @@ if USESQL:
DBNAME: Final[str] = os.getenv("DBNAME", "TEMP_SENSR")
# Flightchecks-------------------------------------------
# Check if some neccesary ENVs are passed
if not USEINFLUX and not USESQL:
raise Exception("No database selected to store the data")
# DBprepare-------------------------------------------
# INFLUX
if USEINFLUX:
@@ -45,7 +52,6 @@ if USESQL:
Session = sessionmaker(bind=engine)
def tempsnsrIntoSQLDB(
tableInp: Annotated[int, "Name of the table"],
insertData: Annotated[str, "Data to insert"]
@@ -87,7 +93,8 @@ def tempsnsrIntoSQLDB(
def tempsnsrIntoFluxQLDB(
inpayload: Annotated[snmpPyData, "Payload"]
inIdracPayload: Annotated[snmpPyIDRACData, "Payload"] | None = None,
inCiscoPayload: Annotated[int, "yes"] | None = None
) -> int:
"""