def __init__(self, *args, **kwargs):
        ServiceProcess.__init__(self, *args, **kwargs)

        self.routing = {
        }  # mapping of queues to a list of bindings (station ids/sensor ids)
        self.workers = {
        }  # mapping of known worker vms to info about those vms (cores / running instances)

        # get configs for current exchange setup from exchange space, queues as per what TopicWorkerReceiver (below) uses
        exchcnfg = self.container.exchange_manager.exchange_space.exchange
        msgcnfg = messaging.worker('temp')

        # for timing
        self._timer = time.time()

        # for reconfigure events
        self._reconfigure_timeout = None

        # provisioner vars are common vars for all worker instances
        self.prov_vars = {
            'sqlt_vars': {
                'inp_exchange': INP_EXCHANGE_NAME,
                'inp_exchange_type': exchcnfg.exchange_type,
                'inp_exchange_durable': str(exchcnfg.durable).lower(),
                'inp_exchange_autodelete': str(exchcnfg.auto_delete).lower(),
                'inp_queue_durable': msgcnfg['durable'],
                'inp_queue_autodelete': msgcnfg['auto_delete'],
                'det_topic': DETECTION_TOPIC,
                'det_exchange': OUT_EXCHANGE_NAME,
                'det_exchange_type': exchcnfg.exchange_type,
                'det_exchange_durable': str(exchcnfg.durable).lower(),
                'det_exchange_autodelete': str(exchcnfg.auto_delete).lower()
            }
        }
    def __init__(self, *args, **kwargs):
        ServiceProcess.__init__(self, *args, **kwargs)

        self.routing = {}   # mapping of queues to a list of bindings (station ids/sensor ids)
        self.workers = {}   # mapping of known worker vms to info about those vms (cores / running instances)

        # get configs for current exchange setup from exchange space, queues as per what TopicWorkerReceiver (below) uses
        exchcnfg = self.container.exchange_manager.exchange_space.exchange
        msgcnfg = messaging.worker('temp')

        # for timing
        self._timer = time.time()

        # for reconfigure events
        self._reconfigure_timeout = None

        # provisioner vars are common vars for all worker instances
        self.prov_vars = { 'sqlt_vars' : { 'inp_exchange'           : INP_EXCHANGE_NAME,
                                           'inp_exchange_type'      : exchcnfg.exchange_type,
                                           'inp_exchange_durable'   : str(exchcnfg.durable).lower(),
                                           'inp_exchange_autodelete': str(exchcnfg.auto_delete).lower(),
                                           'inp_queue_durable'      : msgcnfg['durable'],
                                           'inp_queue_autodelete'   : msgcnfg['auto_delete'],
                                           'det_topic'              : DETECTION_TOPIC,
                                           'det_exchange'           : OUT_EXCHANGE_NAME,
                                           'det_exchange_type'      : exchcnfg.exchange_type,
                                           'det_exchange_durable'   : str(exchcnfg.durable).lower(),
                                           'det_exchange_autodelete': str(exchcnfg.auto_delete).lower() } }
 def __init__(self, *args, **kwargs):
     ServiceProcess.__init__(self, *args, **kwargs)
     log.debug('SiamCiReceiverService.__init__()')
     
     self.rc = ResourceClient(proc=self)
     self.mc = MessageClient(proc=self)
     
     self.checkTimeout = None
     
     # the set of id's given via op_expect:
     self.expect = set()
     
     # the (id, content) pairs accepted via op_acceptResponse:
     self.accepted = {}
Beispiel #4
0
    def __init__(self, *args, **kwargs):
        self.fake_state = None

        ServiceProcess.__init__(self, *args, **kwargs)
Beispiel #5
0
    def __init__(self, *args, **kwargs):
        self.requests = defaultdict(list)
        self.poll_count = {}
        self.errors = {}

        ServiceProcess.__init__(self, *args, **kwargs)