def setup(self, thread_id, **kwargs):
        self.thread_id = thread_id

        # get the settings from the main config in kwargs
        if 'worker_settings' in kwargs:
            if self.name in kwargs['worker_settings']:
                self.settings.update(kwargs['worker_settings'][self.name])
            elif 'all' in kwargs['worker_settings']:
                self.settings.update(kwargs['worker_settings']['all'])
            else:
                log.info('{0}# no settings loaded from config'.format(self.thread_id))

        self.redis_host = self.settings['redis-host']
        self.redis_port = self.settings['redis-port']

        # keep track of the events dumped
        self.dumped = 0

        log.info("{0}# Worker '{1}' initiated".format(self.thread_id, self.name))
Setup the worker and read all settings
dataset/ETHPy150Open felskrone/salt-eventsd/doc/share/doc/eventsd_workers/Minion_Batch_Return_Worker.py/Minion_Batch_Return_Worker.setup