Skip to content

Commit

Permalink
bug fix, write operations failed to start
Browse files Browse the repository at this point in the history
  • Loading branch information
IgnacioHR committed Apr 2, 2022
1 parent 08ae2b8 commit 050795e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
16 changes: 8 additions & 8 deletions diematic_server/diematicd.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
from daemon import pidfile
from aiohttp import web
import asyncio
import concurrent.futures

from webserver import DiematicWebRequestHandler

Expand Down Expand Up @@ -131,16 +132,15 @@ def _get_context(self):
self.context.app = self

self.pidfile_timeout = 3
# self._open_streams_from_app_stream_paths()
return self.context

# def _get_executor(self):
# """ create the executor pool or return if already created """
# try:
# return self.executor
# except AttributeError:
# self.executor = concurrent.futures.ThreadPoolExecutor(max_workers=1)
# return self.executor
def _get_executor(self):
""" create the executor pool or return if already created """
try:
return self.executor
except AttributeError:
self.executor = concurrent.futures.ThreadPoolExecutor(max_workers=1)
return self.executor

def _value_writer(self):
""" consumes a job writing to the boiler """
Expand Down
1 change: 1 addition & 0 deletions diematic_server/webserver.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ async def set_param(request):
value = jsoninput['value']
mainapp = request.app["mainapp"]
mainapp.MyBoiler.set_write_pending(param_name, value)
mainapp.check_pending_writes()
return web.Response()

@routes.post('/diematic/parameters/{paramName}/resume')
Expand Down

0 comments on commit 050795e

Please sign in to comment.