moved config. saved a workable state

This commit is contained in:
buenosairesam
2025-05-13 04:23:40 -03:00
parent f531be7158
commit 7995040c82
4 changed files with 102 additions and 62 deletions

21
dmapp/dmcore/config.py Normal file
View File

@@ -0,0 +1,21 @@
# dmapp/dmcore/config.py
import logging
from pymongo import MongoClient
# Logging configuration
logging.basicConfig(
level=logging.INFO,
format="%(asctime)s %(levelname)-8s [%(filename)s:%(lineno)d] %(message)s",
datefmt="%Y-%m-%d %H:%M:%S",
)
logger = logging.getLogger(__name__)
# MongoDB configuration
client = MongoClient()
db = client.deskmeter
# Collections
switches = db.switch
states = db.state
tasks = db.task