Start the dynamic configuration manager in dependent commands

This commit is contained in:
Chris Eager 2023-05-23 17:10:25 -05:00 committed by Chris Eager
parent b034a088b1
commit c2317e8493
3 changed files with 7 additions and 1 deletions

View File

@ -90,6 +90,8 @@ public class CrawlAccountsCommand extends EnvironmentCommand<WhisperServerConfig
configuration.getAppConfig().getConfigurationName(),
DynamicConfiguration.class);
dynamicConfigurationManager.start();
final AccountDatabaseCrawler crawler =
switch ((CrawlType) namespace.get(CRAWL_TYPE)) {

View File

@ -53,7 +53,9 @@ public class MessagePersisterServiceCommand extends EnvironmentCommand<WhisperSe
configuration.getAppConfig().getConfigurationName(),
DynamicConfiguration.class);
MessagePersister messagePersister = new MessagePersister(deps.messagesCache(), deps.messagesManager(),
dynamicConfigurationManager.start();
final MessagePersister messagePersister = new MessagePersister(deps.messagesCache(), deps.messagesManager(),
deps.accountsManager(),
dynamicConfigurationManager,
Duration.ofMinutes(configuration.getMessageCacheConfiguration().getPersistDelayMinutes()),

View File

@ -63,6 +63,8 @@ public class ScheduledApnPushNotificationSenderServiceCommand extends Environmen
configuration.getAppConfig().getConfigurationName(),
DynamicConfiguration.class);
dynamicConfigurationManager.start();
final APNSender apnSender = new APNSender(apnSenderExecutor, configuration.getApnConfiguration());
final ApnPushNotificationScheduler apnPushNotificationScheduler = new ApnPushNotificationScheduler(
pushSchedulerCluster, apnSender, deps.accountsManager(), Optional.of(namespace.getInt(WORKER_COUNT)),