Start the dynamic configuration manager in dependent commands

This commit is contained in:
Chris Eager authored and Chris Eager committed 2023-05-25 09:52:01 -05:00
1 parent b034a088b1
commit c2317e8493
3 files changed
+7 -1

No files matched your search

@@ -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)) {
@@ -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()),
@@ -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)),