1 Commits

Author SHA1 Message Date
a8ecad9329 Use NilmDB serializer for ProcessManager 2013-07-24 14:55:59 -04:00
3 changed files with 7 additions and 3 deletions

View File

@@ -7,7 +7,7 @@ Prerequisites:
sudo apt-get install python2.7 python-setuptools sudo apt-get install python2.7 python-setuptools
# Plus nilmdb and its dependencies # Plus nilmdb and its dependencies
nilmdb (1.8.2+) nilmdb (1.8.3+)
Install: Install:

View File

@@ -22,6 +22,7 @@ from nilmdb.server.serverutil import (
cherrypy_stop, cherrypy_stop,
bool_param, bool_param,
) )
from nilmdb.utils import serializer_proxy
import nilmrun import nilmrun
import nilmrun.testfilter import nilmrun.testfilter
@@ -204,8 +205,11 @@ class Server(object):
# error messages. # error messages.
cherrypy._cperror._ie_friendly_error_sizes = {} cherrypy._cperror._ie_friendly_error_sizes = {}
# The manager maintains internal state and isn't necessarily
# thread-safe, so wrap it in the serializer.
manager = serializer_proxy(nilmrun.processmanager.ProcessManager)()
# Build up the application and mount it # Build up the application and mount it
manager = nilmrun.processmanager.ProcessManager()
root = App() root = App()
root.process = AppProcess(manager) root.process = AppProcess(manager)
root.run = AppRun(manager) root.run = AppRun(manager)

View File

@@ -61,7 +61,7 @@ setup(name='nilmrun',
long_description = "NILM Database Filter Runner", long_description = "NILM Database Filter Runner",
license = "Proprietary", license = "Proprietary",
author_email = 'jim@jtan.com', author_email = 'jim@jtan.com',
install_requires = [ 'nilmdb >= 1.8.2', install_requires = [ 'nilmdb >= 1.8.3',
'psutil >= 0.3.0', 'psutil >= 0.3.0',
'cherrypy >= 3.2', 'cherrypy >= 3.2',
'simplejson', 'simplejson',