def __init__(self, datafetcher_base_config): """Initial setup Checks if all required parameters are set in the configuration """ self.f_descriptors = dict() self.transfer = None DataFetcherBase.__init__(self, datafetcher_base_config, name=__name__) # base class sets # self.config_all - all configurations # self.config_df - the config of the datafetcher # self.config - the module specific config # self.df_type - the name of the datafetcher module # self.log_queue # self.log self.metadata_r = None self.data_r = None self.set_required_params() # check that the required_params are set inside of module specific # config self.check_config() self._setup()
def __init__(self, datafetcher_base_config): DataFetcherBase.__init__(self, datafetcher_base_config, name=__name__) # base class sets # self.config_all - all configurations # self.config_df - the config of the datafetcher # self.config - the module specific config # self.df_type - the name of the datafetcher module # self.log_queue # self.log self.ipc_addresses = None self.endpoints = None self.source_file = None if utils.is_windows(): self.required_params = { "network": ["ext_ip"], "datafetcher": { self.df_type: ["internal_com_endpoint"] } } else: self.required_params = { "network": ["ipc_dir"], "datafetcher": { self.df_type: ["internal_com_endpoint"] } } self._setup()
def __init__(self, datafetcher_base_config): datafetcher_base_config["check_dep"] = False DataFetcherBase.__init__(self, datafetcher_base_config, name=__name__) # base class sets # self.config_all - all configurations # self.config_df - the config of the datafetcher # self.config - the module specific config # self.df_type - the name of the datafetcher module # self.log_queue # self.log self.ipc_addresses = None self.endpoints = None if utils.is_windows(): self.required_params = { "network": ["ext_ip"], "datafetcher": { self.df_type: ["datafetcher_port"] } } else: self.required_params = {"network": ["ipc_dir"]} # check that the required_params are set inside of module specific # config self.check_config() self._setup()
def __init__(self, datafetcher_base_config): DataFetcherBase.__init__(self, datafetcher_base_config, name=__name__) # base class sets # self.config_all - all configurations # self.config_df - the config of the datafetcher # self.config - the module specific config # self.df_type - the name of the datafetcher module # self.log_queue # self.log self.source_file = None self.target_file = None self.is_windows = None self.finish = None self.windows_handle_path = None self.required_params = ["fix_subdirs"] # check that the required_params are set inside of module specific # config self.check_config() self._setup()
def __init__(self, datafetcher_base_config): DataFetcherBase.__init__(self, datafetcher_base_config, name=__name__) # base class sets # self.config_all - all configurations # self.config_df - the config of the datafetcher # self.config - the module specific config # self.df_type - the name of the datafetcher module # self.log_queue # self.log self.required_params = { "datafetcher": [ "store_data", "remove_data", { self.df_type: { "fix_subdirs" } } ], "network": ["session"] } # check that the required_params are set inside of module specific # config self.check_config() self.setup()
def __init__(self, config, log_queue, id, context): DataFetcherBase.__init__(self, config, log_queue, id, "xfel_fetcher-{}".format(id), context) required_params = ["ipc_path", "main_pid"] # Check format of config check_passed, config_reduced = helpers.check_config( required_params, self.config, self.log) if check_passed: self.log.info( "Configuration for data fetcher: {}".format(config_reduced)) self.config = config self.socket = None self.data_fetcher_con_str = ("ipc://{}/{}_{}".format( config["ipc_path"], config["main_pid"], "data_fetcher")) else: # self.log.debug("config={0}".format(self.config)) raise Exception("Wrong configuration") self.create_sockets()
def __init__(self, datafetcher_base_config): datafetcher_base_config["check_dep"] = False DataFetcherBase.__init__(self, datafetcher_base_config, name=__name__) # base class sets # self.config_all - all configurations # self.config_df - the config of the datafetcher # self.config - the module specific config # self.df_type - the name of the datafetcher module # self.log_queue # self.log self.required_params = [] # check that the required_params are set inside of module specific # config self.check_config()