This commit is contained in:
Shams Asari 2019-05-24 17:50:17 +01:00
parent 5619debf18
commit a70bd6ffa0

View File

@ -99,14 +99,6 @@ class CheckpointDumper(private val checkpointStorage: CheckpointStorage, private
} }
} }
private val formatter = DateTimeFormatter.ofPattern("HHmmss.SSS")
fun dump(id: UUID, checkpoint: Checkpoint) {
val info = checkpoint.toJson(id)
val file = serviceHub.configuration.baseDirectory / "$id-${formatter.format(LocalTime.now(serviceHub.clock))}.json"
writer.writeValue(file.toFile(), info)
}
private fun Checkpoint.toJson(id: UUID): CheckpointJson { private fun Checkpoint.toJson(id: UUID): CheckpointJson {
val (fiber, flowLogic) = when (flowState) { val (fiber, flowLogic) = when (flowState) {
is FlowState.Unstarted -> { is FlowState.Unstarted -> {