Skip to content

Commit 3f96809

Browse files
committed
Improve readability of IF condition
1 parent a2d862f commit 3f96809

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

lib/server/kafka/AliEcsSynchronizer.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,9 +109,8 @@ class AliEcsSynchronizer {
109109

110110
if (operationName === 'trg.RunStart()' && operationStepStatus === 'DONE_OK') {
111111
await runService.createOrUpdate(runNumber, environmentId, { timeTrgStart: timestamp.toNumber() });
112-
} else if (
113-
(operationName === 'trg.RunStop()' && operationStepStatus === 'DONE_OK')
114-
|| (operationName === 'trg.EnsureRunStop()' && operationStepStatus === 'DONE_OK')
112+
} else if (operationStepStatus === 'DONE_OK'
113+
&& (operationName === 'trg.RunStop()' || operationName === 'trg.EnsureRunStop()')
115114
) {
116115
await runService.createOrUpdate(runNumber, environmentId, { timeTrgEnd: timestamp.toNumber() });
117116
}

0 commit comments

Comments
 (0)