From e1f8a29eea251e72364438465c2801a14aa61e7b Mon Sep 17 00:00:00 2001 From: homholueng Date: Tue, 16 Apr 2019 19:54:41 +0800 Subject: [PATCH] Minor merge master (#152) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * bugfix: 修复在 get_task_status API 返回的 elapsed_time 为 Float 的问题 * docs: 版本号更新为 3.3.12 * minors: 节点开始时间与结束时间相等时不再做向上取整处理 * docs: 版本号更新为 3.3.13 --- app.yml | 2 +- docs/release.md | 4 ++++ pipeline/engine/utils.py | 5 ++--- readme.md | 2 +- readme_en.md | 2 +- 5 files changed, 9 insertions(+), 6 deletions(-) diff --git a/app.yml b/app.yml index 5f8dbc9e63..b17f7da627 100644 --- a/app.yml +++ b/app.yml @@ -4,7 +4,7 @@ app_name: 标准运维 is_use_celery: True author: 蓝鲸智云 introduction: 标准运维是通过一套成熟稳定的任务调度引擎,把在多系统间的工作整合到一个流程,助力运维实现跨系统调度自动化的SaaS应用。 -version: 3.3.12 +version: 3.3.13 category: 运维工具 language_support: 中文 desktop: diff --git a/docs/release.md b/docs/release.md index 12530c39f6..6faae2e14c 100644 --- a/docs/release.md +++ b/docs/release.md @@ -274,4 +274,8 @@ - 修复在 API 中调用 ESB 获取用户信息异常的问题 # 3.3.12 +- bug fix + - 修复在 get_task_status API 返回的 elapsed_time 为 Float 的问题 + +# 3.3.13 - todo \ No newline at end of file diff --git a/pipeline/engine/utils.py b/pipeline/engine/utils.py index 63153e6773..457c34dea2 100644 --- a/pipeline/engine/utils.py +++ b/pipeline/engine/utils.py @@ -46,13 +46,12 @@ 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: elapsed_time = 0 - return elapsed_time + return int(elapsed_time) class ActionResult(object): diff --git a/readme.md b/readme.md index f95ce541d8..8c8b503617 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.12-brightgreen.svg)](https://github.com/Tencent/bk-sops/releases) +[![Release](https://img.shields.io/badge/release-3.3.13-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 3c4745a47d..7942e9164a 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.12-brightgreen.svg)](https://github.com/Tencent/bk-sops/releases) +[![Release](https://img.shields.io/badge/release-3.3.13-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)