Skip to content

Commit

Permalink
Initialize metrics in ScheduledApnPushNotificationSenderServiceCommand
Browse files Browse the repository at this point in the history
  • Loading branch information
eager-signal committed May 26, 2023
1 parent 0edd99e commit 7ffccd9
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,12 @@
import net.sourceforge.argparse4j.inf.Subparser;
import org.whispersystems.textsecuregcm.WhisperServerConfiguration;
import org.whispersystems.textsecuregcm.configuration.dynamic.DynamicConfiguration;
import org.whispersystems.textsecuregcm.metrics.MetricsUtil;
import org.whispersystems.textsecuregcm.push.APNSender;
import org.whispersystems.textsecuregcm.push.ApnPushNotificationScheduler;
import org.whispersystems.textsecuregcm.redis.FaultTolerantRedisCluster;
import org.whispersystems.textsecuregcm.storage.DynamicConfigurationManager;
import org.whispersystems.textsecuregcm.util.logging.UncaughtExceptionHandler;

public class ScheduledApnPushNotificationSenderServiceCommand extends EnvironmentCommand<WhisperServerConfiguration> {

Expand Down Expand Up @@ -49,6 +51,10 @@ public void configure(final Subparser subparser) {
protected void run(Environment environment, Namespace namespace, WhisperServerConfiguration configuration)
throws Exception {

UncaughtExceptionHandler.register();

MetricsUtil.configureRegistries(configuration, environment);

final CommandDependencies deps = CommandDependencies.build("scheduled-apn-sender", environment, configuration);

final FaultTolerantRedisCluster pushSchedulerCluster = new FaultTolerantRedisCluster("push_scheduler",
Expand Down

0 comments on commit 7ffccd9

Please sign in to comment.