Browse Source

[python] Correct python import syntax in example (#7617)

fix: #7615
3.0.0/version-upgrade
Jiajie Zhong 3 years ago committed by GitHub
parent
commit
fd6eb1f830
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      dolphinscheduler-python/pydolphinscheduler/examples/task_dependent_example.py
  2. 3
      dolphinscheduler-python/pydolphinscheduler/examples/task_switch_example.py

3
dolphinscheduler-python/pydolphinscheduler/examples/task_dependent_example.py

@ -34,8 +34,7 @@ task_dependent:
task_dependent(this task dependent on task_dependent_external.task_1 and task_dependent_external.task_2). task_dependent(this task dependent on task_dependent_external.task_1 and task_dependent_external.task_2).
""" """
from constants import ProcessDefinitionDefault from pydolphinscheduler.constants import ProcessDefinitionDefault
from pydolphinscheduler.core.process_definition import ProcessDefinition from pydolphinscheduler.core.process_definition import ProcessDefinition
from pydolphinscheduler.tasks.dependent import And, Dependent, DependentItem, Or from pydolphinscheduler.tasks.dependent import And, Dependent, DependentItem, Or
from pydolphinscheduler.tasks.shell import Shell from pydolphinscheduler.tasks.shell import Shell

3
dolphinscheduler-python/pydolphinscheduler/examples/task_switch_example.py

@ -29,10 +29,9 @@ parent -> switch ->
. .
""" """
from tasks.switch import Branch, Default, Switch, SwitchCondition
from pydolphinscheduler.core.process_definition import ProcessDefinition from pydolphinscheduler.core.process_definition import ProcessDefinition
from pydolphinscheduler.tasks.shell import Shell from pydolphinscheduler.tasks.shell import Shell
from pydolphinscheduler.tasks.switch import Branch, Default, Switch, SwitchCondition
with ProcessDefinition( with ProcessDefinition(
name="task_dependent_external", name="task_dependent_external",

Loading…
Cancel
Save