From f17de58a71aef418f6d069575dc7a69801c5e0e0 Mon Sep 17 00:00:00 2001 From: Chris Eager Date: Tue, 30 May 2023 09:43:59 -0500 Subject: [PATCH] Change `ScheduledApnPushNotificationSenderServiceCommand` to extend `ServerCommand` --- .../ScheduledApnPushNotificationSenderServiceCommand.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/service/src/main/java/org/whispersystems/textsecuregcm/workers/ScheduledApnPushNotificationSenderServiceCommand.java b/service/src/main/java/org/whispersystems/textsecuregcm/workers/ScheduledApnPushNotificationSenderServiceCommand.java index 68f035360..a1c3d2348 100644 --- a/service/src/main/java/org/whispersystems/textsecuregcm/workers/ScheduledApnPushNotificationSenderServiceCommand.java +++ b/service/src/main/java/org/whispersystems/textsecuregcm/workers/ScheduledApnPushNotificationSenderServiceCommand.java @@ -8,7 +8,7 @@ package org.whispersystems.textsecuregcm.workers; import static com.codahale.metrics.MetricRegistry.name; import io.dropwizard.Application; -import io.dropwizard.cli.EnvironmentCommand; +import io.dropwizard.cli.ServerCommand; import io.dropwizard.setup.Environment; import java.util.Optional; import java.util.concurrent.ExecutorService; @@ -23,7 +23,7 @@ import org.whispersystems.textsecuregcm.redis.FaultTolerantRedisCluster; import org.whispersystems.textsecuregcm.storage.DynamicConfigurationManager; import org.whispersystems.textsecuregcm.util.logging.UncaughtExceptionHandler; -public class ScheduledApnPushNotificationSenderServiceCommand extends EnvironmentCommand { +public class ScheduledApnPushNotificationSenderServiceCommand extends ServerCommand { private static final String WORKER_COUNT = "workers"; @@ -78,6 +78,8 @@ public class ScheduledApnPushNotificationSenderServiceCommand extends Environmen environment.lifecycle().manage(apnSender); environment.lifecycle().manage(apnPushNotificationScheduler); + + super.run(environment, namespace, configuration); } }