def create_worker(self, a_name):
        sub = self.conf_db.pubsub()
        sub.subscribe(self.conf_db.smembers(
            "Analytics:ByName:%s:Subscriptions" % a_name
        ))
        self.subs[a_name] = sub

        prev_chld_handler = signal.signal(signal.SIGCHLD, signal.SIG_DFL)
        prev_term_handler = signal.signal(signal.SIGTERM, signal.SIG_DFL)
        prev_int_handler = signal.signal(signal.SIGINT, signal.SIG_DFL)

        self.log.info("Creating worker for %s" % a_name)
        p = Process(target=actual_worker, args=(a_name, sub, self.app))
        p.start()

        signal.signal(signal.SIGTERM, prev_term_handler)
        signal.signal(signal.SIGINT, prev_int_handler)
        signal.signal(signal.SIGCHLD, prev_chld_handler)

        self.proc[a_name] = p
dataset/ETHPy150Open practo/r5d4/r5d4/analytics_worker.py/AnalyticsWorker.create_worker/original