Package io.meeds.commons.digest.job
Class DigestSenderJob
java.lang.Object
io.meeds.commons.digest.job.DigestSenderJob
The one scheduled job of the digest, hourly by default. Glue only: it hands
the run to the service. It never stops, whatever the administrator switch
says: the switch decides whether emails are produced, the job keeps the
watermarks and the waiting items in order. The run happens on its own
thread: the Spring scheduler thread is shared with the other jobs of the
webapp, and a run serving thousands of users must not delay them. One run at
a time: a run still going when the next hour comes is left alone, the hour
after serves what is due. An occurrence that falls while the server is still
starting waits, on that same thread, for the full startup: the addons whose
services build the lines are not all up yet, and a line whose service is
missing would be skipped.
-
Constructor Details
-
DigestSenderJob
public DigestSenderJob()
-
-
Method Details
-
run
@Scheduled(cron="${exo.notification.digest.job.expression:0 0 * * * ?}") public void run() -
awaitServerStartup
Returns once the server is fully started, HTTP connector included; returns at once when it already is. Never called on the Spring scheduler thread.- Throws:
InterruptedException- when the server stops during the wait
-
isRunning
public boolean isRunning()- Returns:
- true while a run is going
-
stop
@PreDestroy public void stop()
-