diff --git a/src/main/java/io/seqera/tower/cli/commands/runs/ViewCmd.java b/src/main/java/io/seqera/tower/cli/commands/runs/ViewCmd.java index e20b07d0..08996b64 100644 --- a/src/main/java/io/seqera/tower/cli/commands/runs/ViewCmd.java +++ b/src/main/java/io/seqera/tower/cli/commands/runs/ViewCmd.java @@ -144,7 +144,8 @@ protected Response exec() throws ApiException { Map stats = new HashMap<>(); if (opts.stats) { - stats.put("wallTime", TimeUnit.MILLISECONDS.toSeconds(workflow.getDuration()) / 60D); + if( workflow.getDuration() != null ) + stats.put("wallTime", TimeUnit.MILLISECONDS.toSeconds(workflow.getDuration()) / 60D); if(progress.getWorkflowProgress() != null) { stats.put("cpuTime", TimeUnit.MILLISECONDS.toMinutes(progress.getWorkflowProgress().getCpuTime()) / 60D); stats.put("totalMemory", progress.getWorkflowProgress().getMemoryRss() / 1024 / 1024 / 1024D);