wrapped_with_logger¶
- sofia_redux.toolkit.utilities.multiprocessing.wrapped_with_logger(func, logger_pickle_file, log_directory, run_arg_and_identifier)[source]¶
Return the results of the function in multitask and save log records.
- Parameters:
- funcfunction
The function to wrap.
- logger_pickle_filestr
The file path to the pickled logger (
logging.Logger).- log_directorystr
The directory in which to store the log records for each run.
- run_arg_and_identifier2-tuple
Any run time argument that the wrapped function returned by
_wrap_function()requires (object), and an integer identifier signifying it’s position in a list of run arguments.
- Returns:
- resultsobject
The results of running
funcon a given run time argument.