Skip to content

Commit

Permalink
Google Java formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
steinkobben committed Nov 5, 2024
1 parent 5bfc0db commit ac4e10b
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 @@ -136,7 +136,9 @@ public ResponseEntity<Object> list(@RequestParam(required = false) String type)
.put(
Task.DESCRIPTION_KEY,
jobDetail.getJobDataMap().getString(Task.DESCRIPTION_KEY))
.put(Task.LAST_RESULT_KEY, jobDetail.getJobDataMap().getString(Task.LAST_RESULT_KEY))
.put(
Task.LAST_RESULT_KEY,
jobDetail.getJobDataMap().getString(Task.LAST_RESULT_KEY))
.putPOJO(Task.STATE_KEY, state));
});
} catch (SchedulerException e) {
Expand Down
5 changes: 3 additions & 2 deletions src/main/java/org/tailormap/api/scheduling/IndexTask.java
Original file line number Diff line number Diff line change
Expand Up @@ -93,14 +93,15 @@ protected void executeInternal(@NonNull JobExecutionContext context)
persistedJobData.put(
"executions", (1 + (int) context.getMergedJobDataMap().getOrDefault("executions", 0)));
persistedJobData.put("lastExecutionFinished", Instant.now());
persistedJobData.put("lastResult", "Index task executed successfully");
persistedJobData.put(Task.LAST_RESULT_KEY, "Index task executed successfully");

Check warning on line 96 in src/main/java/org/tailormap/api/scheduling/IndexTask.java

View check run for this annotation

Codecov / codecov/patch

src/main/java/org/tailormap/api/scheduling/IndexTask.java#L96

Added line #L96 was not covered by tests
context.setResult("Index task executed successfully");
} catch (UnsupportedOperationException | IOException | SolrServerException | SolrException e) {
logger.error("Error indexing", e);
searchIndex.setStatus(SearchIndex.Status.ERROR).setComment(e.getMessage());
persistedJobData.put("lastExecutionFinished", null);
persistedJobData.put(
Task.LAST_RESULT_KEY, "Index task failed with " + e.getMessage() + ". Check logs for details");
Task.LAST_RESULT_KEY,
"Index task failed with " + e.getMessage() + ". Check logs for details");

Check warning on line 104 in src/main/java/org/tailormap/api/scheduling/IndexTask.java

View check run for this annotation

Codecov / codecov/patch

src/main/java/org/tailormap/api/scheduling/IndexTask.java#L104

Added line #L104 was not covered by tests
searchIndexRepository.save(searchIndex);
context.setResult("Error indexing. Check logs for details.");
throw new JobExecutionException("Error indexing", e);
Expand Down

0 comments on commit ac4e10b

Please sign in to comment.