This is an automated email from the ASF dual-hosted git repository.
chufenggao pushed a commit to branch 3.0.2-prepare
in repository https://gitbox.apache.org/repos/asf/dolphinscheduler.git
The following commit(s) were added to refs/heads/3.0.2-prepare by this push:
new 63f34cc361 [3.0.2-prepare][cherry-pick] Fix python class description
error (#12790)
63f34cc361 is described below
commit 63f34cc361ac13956b52b0f285183f430941c3ca
Author: Eric Gao <[email protected]>
AuthorDate: Mon Nov 7 19:00:26 2022 +0800
[3.0.2-prepare][cherry-pick] Fix python class description error (#12790)
Co-authored-by: chenrj <[email protected]>
---
.../org/apache/dolphinscheduler/common/utils/DateUtils.java | 4 ++--
.../pydolphinscheduler/src/pydolphinscheduler/tasks/python.py | 10 +++++-----
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git
a/dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/DateUtils.java
b/dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/DateUtils.java
index 9fe469ff68..54a9303aba 100644
---
a/dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/DateUtils.java
+++
b/dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/DateUtils.java
@@ -329,8 +329,8 @@ public final class DateUtils {
/**
* format time to duration
*
- * @param d1 d1
- * @param d2 d2
+ * @param start start
+ * @param end end
* @return format time
*/
public static String format2Duration(Date start, Date end) {
diff --git
a/dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/tasks/python.py
b/dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/tasks/python.py
index 52903d48d9..e403c90ff6 100644
---
a/dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/tasks/python.py
+++
b/dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/tasks/python.py
@@ -33,22 +33,22 @@ log = logging.getLogger(__file__)
class Python(Task):
"""Task Python object, declare behavior for Python task to
dolphinscheduler.
- Python task support two types of parameters for :param:``code``, and here
is an example:
+ Python task support two types of parameters for :param:``definition``, and
here is an example:
- Using str type of :param:``code``
+ Using str type of :param:``definition``
.. code-block:: python
- python_task = Python(name="str_type", code="print('Hello Python
task.')")
+ python_task = Python(name="str_type", definition="print('Hello Python
task.')")
- Or using Python callable type of :param:``code``
+ Or using Python callable type of :param:``definition``
.. code-block:: python
def foo():
print("Hello Python task.")
- python_task = Python(name="str_type", code=foo)
+ python_task = Python(name="str_type", definition=foo)
:param name: The name for Python task. It define the task name.
:param definition: String format of Python script you want to execute or
Python callable you