Skip to content

Commit dfc5e5f

Browse files
committed
code cleaning
1 parent ab5a621 commit dfc5e5f

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

scenariorun/src/main/kotlin/com/cosmotech/scenariorun/workflow/argo/ArgoWorkflowService.kt

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -144,8 +144,8 @@ internal class ArgoWorkflowService(
144144
if (workflowId != null) {
145145
workflow.status?.nodes?.forEach { (nodeKey, nodeValue) ->
146146
nodeValue.outputs?.artifacts?.forEach {
147-
if (it.s3 != null) {
148-
val artifactName = it.name ?: ""
147+
val artifactName = it.name ?: ""
148+
it.s3.let {
149149
val artifactLogs =
150150
artifactsByUidService
151151
.getArtifactByUid(workflowId, nodeKey, artifactName)
@@ -236,11 +236,10 @@ internal class ArgoWorkflowService(
236236
getActiveWorkflow(workflowId, workflow.metadata.name!!).status?.nodes?.forEach {
237237
(nodeKey, nodeValue) ->
238238
nodeValue.outputs?.artifacts?.filter { it.name == artifactNameFilter }?.forEach {
239-
if (it.s3 != null) {
240-
val artifactName = it.name ?: ""
239+
it.s3.let {
241240
artifactContent.append(
242241
artifactsByUidService
243-
.getArtifactByUid(workflowId, nodeKey, artifactName)
242+
.getArtifactByUid(workflowId, nodeKey, artifactNameFilter)
244243
.execute()
245244
.body()
246245
?: "")

0 commit comments

Comments
 (0)