Skip to content

Commit

Permalink
async fetching reports
Browse files Browse the repository at this point in the history
  • Loading branch information
Karolis Rusenas committed Aug 18, 2015
1 parent 63645ae commit f02a4b9
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions handlers/web_handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -472,9 +472,11 @@ class SFHandler(BaseHandler):
@gen.coroutine
def get(self):
sf_obj = SFAccess(self.settings)
report_data = yield sf_obj.get_report('00O240000027qtO')

return self.render('salesforce.html',
body=report_data['body'],
title=report_data['title'],
headers=report_data['headers'])
utilisation_data, consultant_bilability = yield [sf_obj.get_utilisation_report(self.settings["consultantUtilisation"]),
sf_obj.get_billability_report(self.settings["consultantBillability"])]

data = {
"utilisation_data": utilisation_data,
"consultant_bilability": consultant_bilability
}
return self.render('salesforce.html', data=data)

0 comments on commit f02a4b9

Please sign in to comment.