Пример #1
0
def _parallelize_config(data):
    if 'platforms' not in data:
        return data
    state = util.safe_load_file(os.environ['MOLECULE_STATE_FILE'])
    if state['is_parallel']:
        data['platforms'] = util._parallelize_platforms(data, state['run_uuid'])
    return data
Пример #2
0
    def __init__(self, config, parallelize_platforms=False):
        """
        Initialize a new platform class and returns None.

        :param config: An instance of a Molecule config.
        :return: None
        """
        if parallelize_platforms:
            config.config["platforms"] = util._parallelize_platforms(
                config.config, config._run_uuid)
        self._config = config