Skip to content

Commit

Permalink
wow we scattered this logic around, huh
Browse files Browse the repository at this point in the history
  • Loading branch information
Luke Sikina committed Dec 28, 2023
1 parent e589a3d commit 6bf6c60
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,8 @@ private QueryStatus convertToQueryStatus(AsyncResult entity) {
status.setStatus(entity.status.toPicSureStatus());

Map<String, Object> metadata = new HashMap<String, Object>();
metadata.put("picsureQueryId", UUIDv5.UUIDFromString(entity.query.toString()));
queryUUIDGen.setId(entity.query);
metadata.put("picsureQueryId", entity.query.getId());
status.setResultMetadata(metadata);
return status;
}
Expand Down Expand Up @@ -432,6 +433,7 @@ private Response _querySync(QueryRequest resultRequest) throws IOException {
}

private ResponseBuilder queryOkResponse(Object obj, Query incomingQuery) {
return Response.ok(obj).header(QUERY_METADATA_FIELD, UUIDv5.UUIDFromString(incomingQuery.toString()));
queryUUIDGen.setId(incomingQuery);
return Response.ok(obj).header(QUERY_METADATA_FIELD, incomingQuery.getId());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,8 @@ private AsyncResult initializeResult(Query query) throws ClassNotFoundException,
AsyncResult result = new AsyncResult(query, p.getHeaderRow(query));
result.status = AsyncResult.Status.PENDING;
result.queuedTime = System.currentTimeMillis();
result.id = UUIDv5.UUIDFromString(query.toString()).toString();
queryUUIDGen.setId(query);
result.id = query.getId();
result.processor = p;
queryUUIDGen.setId(query);
results.put(result.id, result);
Expand Down

0 comments on commit 6bf6c60

Please sign in to comment.