Skip to content
Snippets Groups Projects
Verified Commit dae3b780 authored by David Hoese's avatar David Hoese
Browse files

Enable wunderground upload by default

parent ce9c150d
No related branches found
No related tags found
No related merge requests found
...@@ -245,10 +245,13 @@ def main(): ...@@ -245,10 +245,13 @@ def main():
if args.debug: if args.debug:
print(url) print(url)
else: else:
LOG.info("Uploading new data to wunderground...")
resp = requests.post(url) resp = requests.post(url)
if resp.status_code != 200: if resp.status_code != 200:
warnings.warn('Data failed to upload to {0} with status code {1}: {2}'.format( warnings.warn('Data failed to upload to {0} with status code {1}: {2}'.format(
url, resp.status_code, resp.text)) url, resp.status_code, resp.text))
else:
LOG.info("Upload successful")
if args.sleep_interval: if args.sleep_interval:
time.sleep(args.sleep_interval) time.sleep(args.sleep_interval)
......
...@@ -15,6 +15,6 @@ SCRN=$(screen -list | grep $NAME | awk '{print $1}') ...@@ -15,6 +15,6 @@ SCRN=$(screen -list | grep $NAME | awk '{print $1}')
if [ -n "$SCRN" ]; then if [ -n "$SCRN" ]; then
echo Screen already running: $SCRN echo Screen already running: $SCRN
else else
screen -S $NAME -d -m $PYENV/bin/python -m aosstower.level_00.influxdb -vvv --ldmp RIGTower screen -S $NAME -d -m $PYENV/bin/python -m aosstower.level_00.influxdb -vvv --weather-underground --ldmp RIGTower
echo Started in screen $(screen -list | grep $NAME | awk '{print $1}') echo Started in screen $(screen -list | grep $NAME | awk '{print $1}')
fi fi
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment