Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix node elapse time type error #151

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 4 additions & 0 deletions docs/release.md
Original file line number Diff line number Diff line change
Expand Up @@ -274,4 +274,8 @@
# 3.3.11
- bug fix
- 修复在 API 中调用 ESB 获取用户信息异常的问题

# 3.3.12
- bug fix
- 修复在 get_task_status API 返回的 elapsed_time 为 Float 的问题

5 changes: 2 additions & 3 deletions pipeline/engine/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion readme_en.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down