File tree Expand file tree Collapse file tree 2 files changed +10
-9
lines changed
klass-index-job/src/main/java/no/ssb/klass/search Expand file tree Collapse file tree 2 files changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -7,11 +7,10 @@ metadata:
77 team : dapla-metadata
88 shared-db : " true"
99spec :
10+ schedule : " 0 30 23 * * *" # Run once per day at 23:30
1011 concurrencyPolicy : Forbid
11- failedJobsHistoryLimit : 3
1212 restartPolicy : Never
13- # TODO configure schedule after development is complete
14- # schedule: "1/10 * * * *"
13+ failedJobsHistoryLimit : 3
1514 successfulJobsHistoryLimit : 3
1615 openSearch :
1716 access : admin
Original file line number Diff line number Diff line change @@ -62,11 +62,13 @@ public static void main(String[] args) {
6262 public void run (String ... args ) {
6363 log .info ("Collecting classifications to index" );
6464 CompletableFuture .runAsync (
65- () -> {
66- List <Long > ids = classificationRepository .findPublishedClassificationIds ();
67- log .info ("Starting to index {} classifications" , ids .size ());
68- ids .forEach (indexService ::indexAsync );
69- log .info ("Finished indexing all classifications" );
70- }).join ();
65+ () -> {
66+ List <Long > ids =
67+ classificationRepository .findPublishedClassificationIds ();
68+ log .info ("Starting to index {} classifications" , ids .size ());
69+ ids .forEach (indexService ::indexAsync );
70+ log .info ("Finished indexing all classifications" );
71+ })
72+ .join (); // Block until all complete
7173 }
7274}
You can’t perform that action at this time.
0 commit comments