def _create_array_job(self, inputs_prefix): """ Creates an array job for the passed sdk_task. :param str inputs_prefix: :rtype: _array_job.ArrayJob """ return _array_job.ArrayJob( parallelism=self._max_concurrency if self._max_concurrency else 0, size=1, min_successes=1)
from flytekit.models import array_job as _array_job from flytekit.models import dynamic_job as _dynamic_job from flytekit.models import literals as _literals from flytekit.models import task as _task from flytekit.models.core import identifier as _identifier from flytekit.models.core import workflow as _workflow from tests.flytekit.common import parameterizers LIST_OF_DYNAMIC_TASKS = [ _task.TaskTemplate( _identifier.Identifier(_identifier.ResourceType.TASK, "p", "d", "n", "v"), "python", task_metadata, interfaces, _array_job.ArrayJob(2, 2, 2).to_dict(), container=_task.Container( "my_image", ["this", "is", "a", "cmd"], ["this", "is", "an", "arg"], resources, {"a": "b"}, {"d": "e"}, ), ) for task_metadata, interfaces, resources in product( parameterizers.LIST_OF_TASK_METADATA, parameterizers.LIST_OF_INTERFACES, parameterizers.LIST_OF_RESOURCES, ) ]