Commit 1c76e0c8 authored by Federico Sismondi's avatar Federico Sismondi

Fix() raw weather data collection issues for carouge pilot

parent 3f44788e
......@@ -242,7 +242,8 @@ services:
networks:
default:
ipv4_address: 172.18.1.13
command: ./weather_00_collect_raw_weather_data_carouge
command: ./weather_00_collect_raw_weather_data_carouge.py
# healthcheck:
# test: curl --fail -s http://wms-app-example:${WMS_MODULE_PORT}/healthcheck || exit 1
# start_period: 40s
......
......@@ -16,10 +16,7 @@ logger.setLevel(logging.INFO)
logger.info("Starting to collect..")
COLLECTION_DIR = os.getenv('COLLECTION_DIR', default='.')
# Send updates in a loop
while True:
time.sleep(POST_DATA_PERIOD)
def collect():
logger.info("Querying service..")
weather_data = get_data_from_weather_service()
logger.info("Dumping to disk..")
......@@ -28,4 +25,10 @@ while True:
json.dump(
obj=weather_data,
fp=f
)
\ No newline at end of file
)
collect()
# Send updates in a loop
while True:
time.sleep(POST_DATA_PERIOD)
collect()
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