public InboxEmailsNotificator(IImapSettings imapSettings, IActorRef inboxEmailActor) { this.inboxEmailActor = inboxEmailActor; Context.System.Scheduler.ScheduleTellRepeatedly( TimeSpan.Zero, TimeSpan.FromMinutes(imapSettings.RefreshIntervalMinutes), this.Self, LoadInboxEmails.Instance, this.Self); }
public ServerActorsCollection AddRootActors( ICalendarEventsMailSettings calendarEventsMailSettings, ICalendarEventsPushSettings calendarEventsPushSettings, IImapSettings imapSettings) { var organization = this.actorSystem.ActorOf(this.actorSystem.DI().Props <OrganizationActor>(), WellKnownActorPaths.Organization); var health = this.actorSystem.ActorOf(this.actorSystem.DI().Props <HealthChecker>(), WellKnownActorPaths.Health); var helpdesk = this.actorSystem.ActorOf(Props.Create(() => new HelpdeskActor()), WellKnownActorPaths.Helpdesk); var feeds = this.actorSystem.ActorOf(Props.Create(() => new SharedFeedsActor(organization)), WellKnownActorPaths.SharedFeeds); this.actorSystem.ActorOf(Props.Create(() => new ApplicationBuildsActor()), WellKnownActorPaths.ApplicationBuilds); var persistenceSupervisorFactory = new PersistenceSupervisorFactory(); var userPreferenceActorProps = this.actorSystem.DI().Props <UserPreferencesActor>(); var userPreferences = this.actorSystem.ActorOf( persistenceSupervisorFactory.Get(userPreferenceActorProps), WellKnownActorPaths.UserPreferences); var pushNotificationsDevicesActorProps = PushNotificationsDevicesActor.CreateProps(); var pushNotificationsDevices = this.actorSystem.ActorOf( persistenceSupervisorFactory.Get(pushNotificationsDevicesActorProps), WellKnownActorPaths.PushNotificationsDevices); var inboxEmailsActor = this.actorSystem.ActorOf(this.actorSystem.DI().Props <InboxEmailActor>(), "inbox-emails"); this.actorSystem.ActorOf(Props.Create(() => new InboxEmailsNotificator(imapSettings, inboxEmailsActor)), "emails-notificator"); this.CreateCalendarEventNotificationActors( calendarEventsMailSettings, calendarEventsPushSettings, organization, userPreferences, pushNotificationsDevices); var emailNotificationsActorProps = this.actorSystem.DI().Props <EmailNotificationsActor>(); var pushNotificationsActorProps = this.actorSystem.DI().Props <PushNotificationsActor>(); this.actorSystem.ActorOf( Props.Create(() => new NotificationsDispatcherActor(emailNotificationsActorProps, pushNotificationsActorProps)), WellKnownActorPaths.Notifications); this.actorSystem.ActorOf(this.actorSystem.DI().Props <CalendarEventsApprovalsChecker>(), "calendar-events-approvals"); return(new ServerActorsCollection(organization, health, helpdesk, feeds, userPreferences, pushNotificationsDevices)); }
public InboxEmailActor(IImapSettings imapSettings) { this.imapSettings = imapSettings; }