Skip to content
This repository has been archived by the owner on Nov 9, 2020. It is now read-only.

Commit

Permalink
Add logging for the start and end of the deletion (#137)
Browse files Browse the repository at this point in the history
* Add logging for the start and end of the deletion

* [ci skip] auto patch increment
skip-checks: true

Co-authored-by: ras-rm-bot <[email protected]>
  • Loading branch information
insacuri and ras-rm-bot authored Sep 24, 2020
1 parent e83a9d1 commit 500f104
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion _infra/helm/action-exporter/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ version: 1.2.0

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application.
appVersion: 12.3.11
appVersion: 12.3.12
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,16 @@ public class DeleteEndpoint {
@RequestMapping(method = RequestMethod.DELETE)
public ResponseEntity<String> triggerDelete() throws CTPException {
try {
log.info("Beginning deletion of old records");
List<ExportJob> exportJobs = deleteProcessor.getAllExportJobIdsForDeletion();

for (ExportJob exportJob : exportJobs) {
deleteProcessor.triggerDeleteForExportJob(exportJob);
}
log.info("Completed deletion of old records. [" + exportJobs.size() + "] exportJobs deleted");
return ResponseEntity.ok()
.body("Deletion of old records from [" + exportJobs.size() + "] exportJobs completed");
.body(
"Completed deletion of old records. [" + exportJobs.size() + "] exportJobs deleted");
} catch (RuntimeException e) {
log.error(
"Uncaught exception - transaction rolled back. Will re-run when scheduled by cron", e);
Expand Down

0 comments on commit 500f104

Please sign in to comment.