From 50bc8e974fdfe241ca1d14036caf987dd4564433 Mon Sep 17 00:00:00 2001 From: homholueng Date: Tue, 16 Apr 2019 19:17:01 +0800 Subject: [PATCH 1/3] =?UTF-8?q?bugfix:=20=E4=BF=AE=E5=A4=8D=E5=9C=A8=20get?= =?UTF-8?q?=5Ftask=5Fstatus=20API=20=E8=BF=94=E5=9B=9E=E7=9A=84=20elapsed?= =?UTF-8?q?=5Ftime=20=E4=B8=BA=20Float=20=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pipeline/engine/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pipeline/engine/utils.py b/pipeline/engine/utils.py index 63153e6773..9334b0d95e 100644 --- a/pipeline/engine/utils.py +++ b/pipeline/engine/utils.py @@ -52,7 +52,7 @@ def calculate_elapsed_time(started_time, archived_time): elapsed_time = (timezone.now() - started_time).total_seconds() else: elapsed_time = 0 - return elapsed_time + return int(elapsed_time) class ActionResult(object): From 625859864395886ff567b6836e2e8ef8591e00bf Mon Sep 17 00:00:00 2001 From: homholueng Date: Tue, 16 Apr 2019 19:17:17 +0800 Subject: [PATCH 2/3] =?UTF-8?q?docs:=20=E7=89=88=E6=9C=AC=E5=8F=B7?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E4=B8=BA=203.3.12?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.yml | 2 +- docs/release.md | 4 ++++ readme.md | 2 +- readme_en.md | 2 +- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/app.yml b/app.yml index 173f05b263..5f8dbc9e63 100644 --- a/app.yml +++ b/app.yml @@ -4,7 +4,7 @@ app_name: 标准运维 is_use_celery: True author: 蓝鲸智云 introduction: 标准运维是通过一套成熟稳定的任务调度引擎,把在多系统间的工作整合到一个流程,助力运维实现跨系统调度自动化的SaaS应用。 -version: 3.3.11 +version: 3.3.12 category: 运维工具 language_support: 中文 desktop: diff --git a/docs/release.md b/docs/release.md index ced30a6f4b..27d0697449 100644 --- a/docs/release.md +++ b/docs/release.md @@ -274,4 +274,8 @@ # 3.3.11 - bug fix - 修复在 API 中调用 ESB 获取用户信息异常的问题 + +# 3.3.12 +- bug fix + - 修复在 get_task_status API 返回的 elapsed_time 为 Float 的问题 \ No newline at end of file diff --git a/readme.md b/readme.md index be48bf1d23..f95ce541d8 100644 --- a/readme.md +++ b/readme.md @@ -2,7 +2,7 @@ ![](docs/resource/img/bk_sops.png) --- [![license](https://img.shields.io/badge/license-MIT-brightgreen.svg)](https://github.com/Tencent/bk-sops/blob/master/LICENSE) -[![Release](https://img.shields.io/badge/release-3.3.11-brightgreen.svg)](https://github.com/Tencent/bk-sops/releases) +[![Release](https://img.shields.io/badge/release-3.3.12-brightgreen.svg)](https://github.com/Tencent/bk-sops/releases) [![travis-ci](https://travis-ci.com/Tencent/bk-sops.svg?branch=master)](https://travis-ci.com/Tencent/bk-sops) [![Coverage Status](https://codecov.io/gh/Tencent/bk-sops/branch/master/graph/badge.svg)](https://codecov.io/gh/Tencent/bk-sops) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/Tencent/bk-sops/pulls) diff --git a/readme_en.md b/readme_en.md index fee860fc3e..3c4745a47d 100644 --- a/readme_en.md +++ b/readme_en.md @@ -2,7 +2,7 @@ ![](docs/resource/img/bk_sops.png) --- [![license](https://img.shields.io/badge/license-MIT-brightgreen.svg)](https://github.com/Tencent/bk-sops/blob/master/LICENSE) -[![Release](https://img.shields.io/badge/release-3.3.11-brightgreen.svg)](https://github.com/Tencent/bk-sops/releases) +[![Release](https://img.shields.io/badge/release-3.3.12-brightgreen.svg)](https://github.com/Tencent/bk-sops/releases) [![travis-ci](https://travis-ci.com/Tencent/bk-sops.svg?branch=master)](https://travis-ci.com/Tencent/bk-sops) [![Coverage Status](https://codecov.io/gh/Tencent/bk-sops/branch/master/graph/badge.svg)](https://codecov.io/gh/Tencent/bk-sops) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/Tencent/bk-sops/pulls) From 6338cbb3e12219ee6ca4aa96f77856d11aa86b4c Mon Sep 17 00:00:00 2001 From: homholueng Date: Tue, 16 Apr 2019 19:24:27 +0800 Subject: [PATCH 3/3] =?UTF-8?q?minors:=20=E8=8A=82=E7=82=B9=E5=BC=80?= =?UTF-8?q?=E5=A7=8B=E6=97=B6=E9=97=B4=E4=B8=8E=E7=BB=93=E6=9D=9F=E6=97=B6?= =?UTF-8?q?=E9=97=B4=E7=9B=B8=E7=AD=89=E6=97=B6=E4=B8=8D=E5=86=8D=E5=81=9A?= =?UTF-8?q?=E5=90=91=E4=B8=8A=E5=8F=96=E6=95=B4=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pipeline/engine/utils.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pipeline/engine/utils.py b/pipeline/engine/utils.py index 9334b0d95e..457c34dea2 100644 --- a/pipeline/engine/utils.py +++ b/pipeline/engine/utils.py @@ -46,8 +46,7 @@ def calculate_elapsed_time(started_time, archived_time): @return: """ if archived_time and started_time: - # when status_tree['archived_time'] == status_tree['started_time'], set elapsed_time to 1s - elapsed_time = (archived_time - started_time).total_seconds() or 1 + elapsed_time = (archived_time - started_time).total_seconds() elif started_time: elapsed_time = (timezone.now() - started_time).total_seconds() else: