add end time to reduction step (#4640)

* add end time to reduction step

* add changelog

---------

Co-authored-by: Long Ma <long@smilecdr.com>
This commit is contained in:
longma1 2023-03-10 15:01:28 -07:00 committed by GitHub
parent 5eca889296
commit 37f5e59ffc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 0 deletions

View File

@ -0,0 +1,4 @@
---
type: fix
issue: 4324
title: "Fix issue where end time is missing for bulk exports on completion"

View File

@ -34,6 +34,7 @@ import ca.uhn.fhir.util.JsonUtil;
import ca.uhn.fhir.util.Logs;
import org.slf4j.Logger;
import java.util.Date;
import java.util.Optional;
public class ReductionStepDataSink<PT extends IModelJson, IT extends IModelJson, OT extends IModelJson>
@ -72,6 +73,7 @@ public class ReductionStepDataSink<PT extends IModelJson, IT extends IModelJson,
String dataString = JsonUtil.serialize(data, false);
instance.setReport(dataString);
instance.setStatus(StatusEnum.COMPLETED);
instance.setEndTime(new Date());
ourLog.info("Finalizing job instance {} with report length {} chars", instance.getInstanceId(), dataString.length());
ourLog.atTrace()