Replace executor with async_add_job (#7658)

* Remove executor

* Lint

* Lint

* Fix tests
This commit is contained in:
Paulus Schoutsen authored and GitHub committed 2017-05-26 08:28:07 -07:00
1 parent 9e9705d6b2
commit f43db3c615
46 files changed
+196 -248

No files matched your search

+2 -2
View File
@@ -134,8 +134,8 @@ class LogbookView(HomeAssistantView):
end_day = start_day + timedelta(days=1)
hass = request.app['hass']
events = yield from hass.loop.run_in_executor(
None, _get_events, hass, start_day, end_day)
events = yield from hass.async_add_job(
_get_events, hass, start_day, end_day)
events = _exclude_events(events, self.config)
return self.json(humanify(events))