From 8d4a762d57e8eae70f5b5e031da8976c44114e04 Mon Sep 17 00:00:00 2001 From: Benjamin Van Ryseghem Date: Thu, 7 Aug 2014 23:01:17 +0200 Subject: [PATCH] Better refresh of data --- nextaction.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/nextaction.py b/nextaction.py index 5ed2955..bab6230 100755 --- a/nextaction.py +++ b/nextaction.py @@ -363,12 +363,12 @@ def main(): logging.basicConfig(level=logging.INFO) response = GetResponse() json_data = json.loads(response.read()) - response = GetLabels() - json_data['Labels'] = json.loads(response.read()) - response = GetProjects() - json_data['Projects'] = json.loads(response.read()) - logging.debug("Got initial data: %s", json_data) while True: + response = GetLabels() + json_data['Labels'] = json.loads(response.read()) + response = GetProjects() + json_data['Projects'] = json.loads(response.read()) + logging.debug("Got initial data: %s", json_data) logging.info("*** Retrieving Data") singleton = TodoistData(json_data) logging.info("*** Data built")