Skip to content

Commit

Permalink
feature: 原子操作能力支持滚动执行 TencentBlueKing#446
Browse files Browse the repository at this point in the history
  • Loading branch information
hLinx committed Jul 11, 2022
1 parent 462d408 commit 2270792
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -127,18 +127,17 @@
stepInstanceId: this.stepInstanceId,
batch: this.batch,
}).then((data) => {
const max = _.max(data.map(_ => _.retryCount));
const result = data.map((item) => {
const num = data.length;
const result = data.map((item, index) => {
const {
retryCount,
createTime,
} = item;

const realIndex = retryCount + 1;
return {
retryCount,
createTime,
text: retryCount !== max ? ordinalSuffixOf(realIndex) : 'LATEST',
text: index === 0 ? 'LATEST' : ordinalSuffixOf(num - index),
};
});
this.executionList = Object.freeze(result);
Expand Down

0 comments on commit 2270792

Please sign in to comment.