GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing dolphinscheduler.apache.org — Python — apache-dolphinscheduler 4.1.0-dev documentation PythonA Python task type’s example and dive into information of PyDolphinScheduler. Example"""An example workflow for task python.""" from pydolphinscheduler.core.workflow import Workflow from pydolphinscheduler.tasks.python import Python with Workflow( name="task_python_example", ) as workflow: task_python = Python( name="task", definition="print('hello world.')", ) # [start resource_limit] python_resources_limit = Python( name="python_resources_limit", definition="print('hello world.')", cpu_quota=1, memory_max=100, ) # [end resource_limit] task_python >> python_resources_limit workflow.submit() Resource Limit ExampleWe can add resource limit like CPU quota and max memory by passing parameters when declaring tasks. python_resources_limit = Python( name="python_resources_limit", definition="print('hello world.')", cpu_quota=1, memory_max=100, ) Dive IntoTask Python.
YAML file example# Define the workflow workflow: name: "Python" # Define the tasks within the workflow tasks: - name: python task_type: Python definition: | import os print(os) print("1") print("2") |
| You are visitor 01402775 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |