HTTP
Task shell.
- class pydolphinscheduler.tasks.http.Http(name: str, url: str, http_method: str | None = 'GET', http_params: str | None = None, http_check_condition: str | None = 'STATUS_CODE_DEFAULT', condition: str | None = None, connect_timeout: int | None = 60000, socket_timeout: int | None = 60000, *args, **kwargs)[source]
Bases:
Task
Task HTTP object, declare behavior for HTTP task to dolphinscheduler.
- _downstream_task_codes: Set[int]
- _task_custom_attr: set = {'condition', 'connect_timeout', 'http_check_condition', 'http_method', 'http_params', 'socket_timeout', 'url'}
- _task_relation: Set[TaskRelation]
- _upstream_task_codes: Set[int]
- class pydolphinscheduler.tasks.http.HttpCheckCondition[source]
Bases:
object
Constant of HTTP check condition.
For now it contain four value: - STATUS_CODE_DEFAULT: when http response code equal to 200, mark as success. - STATUS_CODE_CUSTOM: when http response code equal to the code user define, mark as success. - BODY_CONTAINS: when http response body contain text user define, mark as success. - BODY_NOT_CONTAINS: when http response body do not contain text user define, mark as success.
- BODY_CONTAINS = 'BODY_CONTAINS'
- BODY_NOT_CONTAINS = 'BODY_NOT_CONTAINS'
- STATUS_CODE_CUSTOM = 'STATUS_CODE_CUSTOM'
- STATUS_CODE_DEFAULT = 'STATUS_CODE_DEFAULT'