Better refresh of data

master
Benjamin Van Ryseghem 2014-08-07 23:01:17 +02:00
parent d3f6745667
commit 8d4a762d57
1 changed files with 5 additions and 5 deletions

View File

@ -363,12 +363,12 @@ def main():
logging.basicConfig(level=logging.INFO) logging.basicConfig(level=logging.INFO)
response = GetResponse() response = GetResponse()
json_data = json.loads(response.read()) json_data = json.loads(response.read())
while True:
response = GetLabels() response = GetLabels()
json_data['Labels'] = json.loads(response.read()) json_data['Labels'] = json.loads(response.read())
response = GetProjects() response = GetProjects()
json_data['Projects'] = json.loads(response.read()) json_data['Projects'] = json.loads(response.read())
logging.debug("Got initial data: %s", json_data) logging.debug("Got initial data: %s", json_data)
while True:
logging.info("*** Retrieving Data") logging.info("*** Retrieving Data")
singleton = TodoistData(json_data) singleton = TodoistData(json_data)
logging.info("*** Data built") logging.info("*** Data built")