mirror of
https://github.com/sismics/docs.git
synced 2024-11-22 05:57:57 +01:00
inbox service logs
This commit is contained in:
parent
65b038afcd
commit
c511ed380e
@ -74,10 +74,12 @@ public class AppContext {
|
||||
Config luceneStorageConfig = configDao.getById(ConfigType.LUCENE_DIRECTORY_STORAGE);
|
||||
indexingService = new IndexingService(luceneStorageConfig != null ? luceneStorageConfig.getValue() : null);
|
||||
indexingService.startAsync();
|
||||
indexingService.awaitRunning();
|
||||
|
||||
// Start inbox service
|
||||
inboxService = new InboxService();
|
||||
inboxService.startAsync();
|
||||
indexingService.awaitRunning();
|
||||
|
||||
// Register fonts
|
||||
PdfUtil.registerFonts();
|
||||
|
@ -54,7 +54,11 @@ public class InboxService extends AbstractScheduledService {
|
||||
|
||||
@Override
|
||||
protected void runOneIteration() {
|
||||
syncInbox();
|
||||
try {
|
||||
syncInbox();
|
||||
} catch (Exception e) {
|
||||
log.error("Exception during inbox synching", e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -77,7 +81,7 @@ public class InboxService extends AbstractScheduledService {
|
||||
try {
|
||||
inbox = openInbox();
|
||||
Message[] messages = inbox.search(new FlagTerm(new Flags(Flags.Flag.SEEN), false));
|
||||
log.info(messages.length + " messages found, importing...");
|
||||
log.info(messages.length + " messages found");
|
||||
for (Message message : messages) {
|
||||
importMessage(message);
|
||||
lastSyncMessageCount++;
|
||||
@ -131,7 +135,7 @@ public class InboxService extends AbstractScheduledService {
|
||||
|
||||
@Override
|
||||
protected Scheduler scheduler() {
|
||||
return Scheduler.newFixedDelaySchedule(0, 15, TimeUnit.MINUTES);
|
||||
return Scheduler.newFixedDelaySchedule(0, 1, TimeUnit.MINUTES);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user