Commit 7c4450dc authored by Cédric Crettaz's avatar Cédric Crettaz 🖥

Update app.py for DMV and DCA Carouge fountain.

parent 1acdfa7e
......@@ -32,7 +32,8 @@ logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(message)s', date
# get config from environment
COLLECTION_DIR = os.getenv('COLLECTION_DIR', default='raw_data')
URL_BASE = 'http://{}:1026'.format(os.getenv('ORION_HOST', default='localhost'))
#URL_BASE = 'http://{}:1026'.format(os.getenv('ORION_HOST', default='localhost'))
URL_BASE = 'http://{}:5002'.format(os.getenv('DATA_MODEL_VALIDATION', default='localhost'))
# QuantumLeap subscription (for pushing local data to hsitorical DB)
NOTIFICATION_ID = "5f60dcf399fc2ae29f141b92"
......@@ -360,7 +361,8 @@ def _update_fountain_entity(sensor_dataFrame, timestamp):
# id and type attrs are not needed when patching entity
entity.pop('id')
entity.pop('type')
url = "{}/v2/entities/{}/attrs".format(URL_BASE, URN_FOUNTAIN_ENTITY)
#url = "{}/v2/entities/{}/attrs".format(URL_BASE, URN_FOUNTAIN_ENTITY)
url = "{}/validation/v2/entities/{}/attrs".format(URL_BASE, URN_FOUNTAIN_ENTITY)
r = client_request.patch(
url=url,
headers=http_header_post,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment