コード例 #1
0
    def setup(self, info):
        """
        This is the setup method for the process, called before it
        is ran.

        :return:
        """

        # Setup the resource server and the manager instance

        self._logger.info("[+] Setting up the resource manager.")
        self.__resources, self.__manager \
            = get_server_manager()

        # Setup the subscriber instance
        self._logger.info("[+] Starting the subscriber.")
        self.__subscriber = NodeConsumer(
            NodeConsumer.format_url(
                info['SUBSCRIBER']
            ),
            self._name,
            self.__apps.keys()
        )

        # Wrapper
        self._setup(info)
        return