Skip to content

Commit

Permalink
change last_update_time field
Browse files Browse the repository at this point in the history
Signed-off-by: Bhavana Ramaram <[email protected]>
  • Loading branch information
rbhavna committed Jul 23, 2024
1 parent 5513c27 commit 64dbbd2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion common/src/main/java/org/opensearch/ml/common/MLConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ public static MLConfig parse(XContentParser parser) throws IOException {
Configuration mlConfiguration = null;
Instant createTime = null;
Instant lastUpdateTime = null;
Instant lastUpdatedTime = null;

ensureExpectedToken(XContentParser.Token.START_OBJECT, parser.currentToken(), parser);
while (parser.nextToken() != XContentParser.Token.END_OBJECT) {
Expand All @@ -136,6 +137,9 @@ public static MLConfig parse(XContentParser parser) throws IOException {
case LAST_UPDATE_TIME_FIELD:
lastUpdateTime = Instant.ofEpochMilli(parser.longValue());
break;
case LAST_UPDATED_TIME_FIELD:
lastUpdatedTime = Instant.ofEpochMilli(parser.longValue());
break;
default:
parser.skipChildren();
break;
Expand All @@ -145,7 +149,7 @@ public static MLConfig parse(XContentParser parser) throws IOException {
.type(configType == null ? type : configType)
.configuration(mlConfiguration == null ? configuration : mlConfiguration)
.createTime(createTime)
.lastUpdateTime(lastUpdateTime)
.lastUpdateTime(lastUpdatedTime == null ? lastUpdateTime : lastUpdatedTime)
.build();
}
}

0 comments on commit 64dbbd2

Please sign in to comment.