mirror of
https://github.com/signalapp/Signal-Server
synced 2026-04-21 08:28:11 +01:00
Introduce a job scheduler and experiment for sending notifications to idle devices
This commit is contained in:
@@ -251,7 +251,12 @@ import org.whispersystems.textsecuregcm.workers.BackupMetricsCommand;
|
||||
import org.whispersystems.textsecuregcm.workers.CertificateCommand;
|
||||
import org.whispersystems.textsecuregcm.workers.CheckDynamicConfigurationCommand;
|
||||
import org.whispersystems.textsecuregcm.workers.DeleteUserCommand;
|
||||
import org.whispersystems.textsecuregcm.workers.DiscardPushNotificationExperimentSamplesCommand;
|
||||
import org.whispersystems.textsecuregcm.workers.FinishPushNotificationExperimentCommand;
|
||||
import org.whispersystems.textsecuregcm.workers.IdleDeviceNotificationSchedulerFactory;
|
||||
import org.whispersystems.textsecuregcm.workers.MessagePersisterServiceCommand;
|
||||
import org.whispersystems.textsecuregcm.workers.NotifyIdleDevicesWithoutMessagesExperimentFactory;
|
||||
import org.whispersystems.textsecuregcm.workers.ProcessScheduledJobsServiceCommand;
|
||||
import org.whispersystems.textsecuregcm.workers.RemoveExpiredAccountsCommand;
|
||||
import org.whispersystems.textsecuregcm.workers.RemoveExpiredBackupsCommand;
|
||||
import org.whispersystems.textsecuregcm.workers.RemoveExpiredLinkedDevicesCommand;
|
||||
@@ -260,6 +265,7 @@ import org.whispersystems.textsecuregcm.workers.ScheduledApnPushNotificationSend
|
||||
import org.whispersystems.textsecuregcm.workers.ServerVersionCommand;
|
||||
import org.whispersystems.textsecuregcm.workers.SetRequestLoggingEnabledTask;
|
||||
import org.whispersystems.textsecuregcm.workers.SetUserDiscoverabilityCommand;
|
||||
import org.whispersystems.textsecuregcm.workers.StartPushNotificationExperimentCommand;
|
||||
import org.whispersystems.textsecuregcm.workers.UnlinkDeviceCommand;
|
||||
import org.whispersystems.textsecuregcm.workers.ZkParamsCommand;
|
||||
import org.whispersystems.websocket.WebSocketResourceProviderFactory;
|
||||
@@ -313,6 +319,24 @@ public class WhisperServerService extends Application<WhisperServerConfiguration
|
||||
bootstrap.addCommand(new RemoveExpiredBackupsCommand(Clock.systemUTC()));
|
||||
bootstrap.addCommand(new BackupMetricsCommand(Clock.systemUTC()));
|
||||
bootstrap.addCommand(new RemoveExpiredLinkedDevicesCommand());
|
||||
bootstrap.addCommand(new ProcessScheduledJobsServiceCommand("process-idle-device-notification-jobs",
|
||||
"Processes scheduled jobs to send notifications to idle devices",
|
||||
new IdleDeviceNotificationSchedulerFactory()));
|
||||
|
||||
bootstrap.addCommand(
|
||||
new StartPushNotificationExperimentCommand<>("start-notify-idle-devices-without-messages-experiment",
|
||||
"Start an experiment to send push notifications to idle devices with empty message queues",
|
||||
new NotifyIdleDevicesWithoutMessagesExperimentFactory()));
|
||||
|
||||
bootstrap.addCommand(
|
||||
new FinishPushNotificationExperimentCommand<>("finish-notify-idle-devices-without-messages-experiment",
|
||||
"Finish an experiment to send push notifications to idle devices with empty message queues",
|
||||
new NotifyIdleDevicesWithoutMessagesExperimentFactory()));
|
||||
|
||||
bootstrap.addCommand(
|
||||
new DiscardPushNotificationExperimentSamplesCommand("discard-notify-idle-devices-without-messages-samples",
|
||||
"Discard samples from the \"notify idle devices without messages\" experiment",
|
||||
new NotifyIdleDevicesWithoutMessagesExperimentFactory()));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user