Skip to content

Commit

Permalink
Fix for (some) pdf reports not being send
Browse files Browse the repository at this point in the history
With the default config the `lr.email.burst` is 20.  If clarin-dspace needs to send
more than `lr.email.burst` mails, some of them get queued.
The piwik-report-generator is a short lived process, it does not wait for the queue
to be empty and exits. Hence any email in the queue is actually not sent.

This fix just changes `lr.email.burst` when calling `make generate_piwik_reports`.
System properties have a rather low priority. If you have
`lr.email.burst` in `config/modules/*.cfg` or `config/dspace.cfg` this
fix will not work.
  • Loading branch information
kosarko committed Dec 4, 2023
1 parent 5be2aa2 commit 23d0c9e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions dspace-api/src/main/java/org/dspace/core/Email.java
Original file line number Diff line number Diff line change
Expand Up @@ -701,6 +701,7 @@ private static class BurstDelayQueue extends DelayQueue<DelayedEmail> {
public BurstDelayQueue(int burstSize){
super();
this.burstSize = burstSize;
log.info("BurstDelayQueue initiated with burstSize=" + burstSize);
}

@Override
Expand Down
2 changes: 1 addition & 1 deletion utilities/project_helpers/scripts/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -440,4 +440,4 @@ migrate_databases:
./migrate_db.sh $(UTILITIES_DATABASE_NAME)

generate_piwik_reports:
LC_ALL=en_US.UTF-8 $(DSPACE_BIN) piwik-report-generator
LC_ALL=en_US.UTF-8 JAVA_OPTS="-Xmx2048m -Dfile.encoding=UTF-8 -Ddspace.lr.email.burst=32768" $(DSPACE_BIN) piwik-report-generator

0 comments on commit 23d0c9e

Please sign in to comment.