![]() ![]() Please keep them in 170 # sync with TaskGroup when you can! Note that since this is an overload, these 171 # argument defaults aren't actually used at runtime-the real implementation 172 # does not use them, and simply rely on TaskGroup's defaults, so it's not 173 # disastrous if they go out of sync with TaskGroup. Annotations are copied from the TaskGroup 168 # class, only providing a default to 'group_id' (this is optional for the 169 # decorator and defaults to the decorated function's name). tg_kwargs ) 78 except KeyError : 79 group_id = f "at, 164 ) 165 166 167 # This covers the case. _task _group _created : 76 try : 77 group_id = repr (self. bind_partial (**kwargs ) 70 71 def _attrs_post_init_ (self ): 72 self. ib ( False, init = False ) 64 65 tg_class : ClassVar ] = TaskGroup 66 67 68 def _validate (self, _, kwargs ): 69 task_group_sig. ib (factory = dict ) # Parameters forwarded to 'function'. ib (factory = dict ) # Parameters forwarded to TaskGroup. is_callable ()) 60 tg_kwargs : dict = attr. ![]() _init _ ) 55 56 57 () 58 class _TaskGroupFactory (ExpandableFactory, Generic ): 59 function : Callable = attr. dag import DAG 50 51 FParams = ParamSpec ( "FParams" ) 52 FReturn = TypeVar ( "FReturn", None, DAGNode ) 53 54 task_group_sig = inspect. task_group import MappedTaskGroup, TaskGroup 47 48 if TYPE_CHECKING : 49 from airflow. helpers import prevent_duplicates 46 from airflow. typing_compat import ParamSpec 45 from airflow. taskmixin import DAGNode 43 from airflow. expandinput import ( 36 DictOfListsExpandInput, 37 ListOfDictsExpandInput, 38 MappedArgument, 39 OperatorExpandArgument, 40 OperatorExpandKwargsArgument, 41 ) 42 from airflow. ![]() base import ExpandableFactory 35 from airflow. 23 """ 24 25 from _future_ import annotations 26 27 import functools 28 import inspect 29 import warnings 30 from typing import TYPE_CHECKING, Any, Callable, ClassVar, Generic, Mapping, Sequence, TypeVar, overload 31 32 import attr 33 34 from airflow. 19 20 When the decorated function is called, a task group will be created to represent 21 a collection of closely related tasks on the same DAG that should be grouped 22 together when the DAG is displayed graphically. See the License for the 16 # specific language governing permissions and limitations 17 # under the License. ![]() You may obtain a copy of the License at 9 # 10 # 11 # 12 # Unless required by applicable law or agreed to in writing, 13 # software distributed under the License is distributed on an 14 # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 # KIND, either express or implied. The ASF licenses this file 6 # to you under the Apache License, Version 2.0 (the 7 # "License") you may not use this file except in compliance 8 # with the License. See the NOTICE file 4 # distributed with this work for additional information 5 # regarding copyright ownership. As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Python source code syntax highlighting (style: standard) with prefixed line numbers.Īlternatively you can here view or download the uninterpreted source code file.įor more information about "task_group.py" see the Fossies "Dox" file reference documentation.ġ # 2 # Licensed to the Apache Software Foundation (ASF) under one 3 # or more contributor license agreements. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |