|
15 | 15 | import com.fasterxml.jackson.databind.ObjectMapper;
|
16 | 16 | import com.fasterxml.jackson.databind.ObjectWriter;
|
17 | 17 | import com.fasterxml.jackson.databind.PropertyNamingStrategy;
|
| 18 | +import com.fasterxml.jackson.databind.util.StdDateFormat; |
18 | 19 | import io.github.resilience4j.retry.Retry;
|
19 | 20 | import io.github.resilience4j.retry.RetryConfig;
|
20 | 21 | import java.io.IOException;
|
@@ -146,16 +147,15 @@ private List<AnalysisCentricDocument> getAnalysisCentricDocuments(
|
146 | 147 | private UpdateRequest mapAnalysisToUpsertRepositoryQuery(
|
147 | 148 | AnalysisCentricDocument analysisCentricDocument) {
|
148 | 149 | val mapper = new ObjectMapper().setPropertyNamingStrategy(PropertyNamingStrategy.SNAKE_CASE);
|
149 |
| - |
150 | 150 | val paramsBuilder = new HashMap<String, Object>();
|
151 | 151 | paramsBuilder.put(
|
152 | 152 | "repository",
|
153 | 153 | mapper.convertValue(analysisCentricDocument.getRepositories().get(0), Map.class));
|
154 | 154 | paramsBuilder.put("analysis_state", analysisCentricDocument.getAnalysisState());
|
155 |
| - paramsBuilder.put("updated_at", analysisCentricDocument.getUpdatedAt()); |
| 155 | + paramsBuilder.put("updated_at", getDateIso(analysisCentricDocument.getUpdatedAt())); |
156 | 156 | if (analysisCentricDocument.getPublishedAt()
|
157 | 157 | != null) { // Nullable as may not have been published
|
158 |
| - paramsBuilder.put("published_at", analysisCentricDocument.getPublishedAt()); |
| 158 | + paramsBuilder.put("published_at", getDateIso(analysisCentricDocument.getPublishedAt())); |
159 | 159 | }
|
160 | 160 |
|
161 | 161 | val parameters = unmodifiableMap(paramsBuilder);
|
|
0 commit comments