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

+1 -1
View File
@@ -138,7 +138,7 @@ class Camera(Entity):
This method must be run in the event loop and returns a coroutine.
"""
return self.hass.loop.run_in_executor(None, self.camera_image)
return self.hass.async_add_job(self.camera_image)
@asyncio.coroutine
def handle_async_mjpeg_stream(self, request):