dolphinscheduler-sdk-python icon indicating copy to clipboard operation
dolphinscheduler-sdk-python copied to clipboard

how to check the status of the task created via below code

Open Rockhillsystems opened this issue 1 year ago • 1 comments

ive tried to create a workfow n task using below py code, how to get the status of this task from another python script dynamically. kindly help.

[start workflow_declare]

r""" A tutorial example set local parameter in pydolphinscheduler.

from pydolphinscheduler.core.parameter import ParameterType from pydolphinscheduler.core.workflow import Workflow from pydolphinscheduler.tasks.shell import Shell

import argparse

parser = argparse.ArgumentParser() parser.add_argument("-p", "--pdffilepath", type=str) parser.add_argument("-o", "--outputfilepath", type=str)

args = parser.parse_args() pdf = args.pdffilepath output = args.outputfilepath

with Workflow(name="pdf2svgnew", release_state="online") as workflow: # [start parameter example] # define a parameter "pdffilepath", and use it in Shell task pdf2svg = Shell( name="pdf2svgnew", command="pdf2svg " + pdf + " " + output + " all "

# [start submit_or_run]

workflow.run()

    # [end submit_or_run]
# [end parameter define]

[end workflow_declare]

Rockhillsystems avatar May 09 '24 13:05 Rockhillsystems

hi @Rockhillsystems, Actually pydolphinscheduler is only for definition not for instance, so we can not get the status from pydolphinscheduler. you can still check the status of task instance by web ui

zhongjiajie avatar May 11 '24 07:05 zhongjiajie