def __init__(self, serverUrl, databaseName,  changeHandlers=None,  changeOptions=None, *args, **kwargs):
     """Waring *args and **kwargs will be run on the different process so the must
         be pickeable and not tied in any way to the calling process otherwise to application
         may get unstable.
     """
     BaseChangeMonitor.__init__(self, None, None, "learningRegistryChangeMonitor", args, kwargs)
     self._serverUrl = serverUrl
     self._databaseName = databaseName
     self._callerThread = None
     self._addHandlerQueue = Queue()
     self._removeHandlerQueue = Queue()
     self._initOptions(changeOptions)
     self._initLastChangeSequence()
     self._initChangeHandlers(changeHandlers)
示例#2
0
 def __init__(self,
              serverUrl,
              databaseName,
              changeHandlers=None,
              changeOptions=None,
              *args,
              **kwargs):
     """Waring *args and **kwargs will be run on the different process so the must
         be pickeable and not tied in any way to the calling process otherwise to application
         may get unstable.
     """
     BaseChangeMonitor.__init__(self, None, None,
                                "learningRegistryChangeMonitor", args,
                                kwargs)
     self._serverUrl = serverUrl
     self._databaseName = databaseName
     self._callerThread = None
     self._addHandlerQueue = Queue()
     self._removeHandlerQueue = Queue()
     self._initOptions(changeOptions)
     self._initLastChangeSequence()
     self._initChangeHandlers(changeHandlers)
示例#3
0
 def start(self, callerThread=None):
     if isinstance(callerThread, Thread):
         self._callerThread = callerThread
     self._selfTerminatorThread()
     BaseChangeMonitor.start(self)
示例#4
0
 def terminate(self):
     BaseChangeMonitor.terminate(self)
     log.debug("\n\n------------I got terminated ...---------------\n\n")
 def start(self, callerThread=None):
     if isinstance(callerThread, Thread):
         self._callerThread = callerThread
     self._selfTerminatorThread()
     BaseChangeMonitor.start(self)
 def terminate(self):
     BaseChangeMonitor.terminate(self)
     log.debug("\n\n------------I got terminated ...---------------\n\n")