executorlib.task_scheduler.interactive.shared.execute_task_dict#
- executorlib.task_scheduler.interactive.shared.execute_task_dict(task_dict: dict, future_obj: Future, interface: SocketInterface, cache_directory: str | None = None, cache_key: str | None = None, error_log_file: str | None = None) → bool[source]#
Execute the task in the task_dict by communicating it via the interface.
- Parameters:
task_dict (dict) – task submitted to the executor as dictionary. This dictionary has the following keys {“fn”: Callable, “args”: (), “kwargs”: {}, “resource_dict”: {}}
future_obj (Future) – A Future representing the given call.
interface (SocketInterface) – socket interface for zmq communication
cache_directory (str, optional) – The directory to store cache files. Defaults to “executorlib_cache”.
cache_key (str, optional) – By default the cache_key is generated based on the function hash, this can be overwritten by setting the cache_key.
error_log_file (str) – Name of the error log file to use for storing exceptions raised by the Python functions submitted to the Executor.
- Returns:
True if the task was submitted successfully, False otherwise.
- Return type:
bool