public static GuestEmailsConfig Create(HostServerType hostType) => new GuestEmailsConfig { QueueName = "Guest.Attributes.Merch", HostType = hostType, GuestEmailServiceVersion = "v1.0", WaitForMessageTimeout = TimeSpan.FromSeconds(4), FileArchiverConfig = new FileArchiverConfig { ArchiveDays = ArchiveDays, ArchivePath = ArchivePath } };
protected override void Run() { Log.Info($"Creating Ninject Kernel for '{HostServerType.ToString()}'."); _predictItQueryTimer = new Timer(_ => DoThing(Log), null, TimeSpan.Zero, TimeSpan.FromSeconds(5)); while (!Stopping) { Thread.Sleep(1000); } }
public GuestEmailsService([Named("GuestEmailClient")] HttpClient guestEmailClient, HostServerType hostServerType) { //To avoid issue with load balancer erroring out after connection has been live for a couple days, hardcode pointing at ec-boaws2 if (hostServerType == HostServerType.Live) { guestEmailClient.BaseAddress = new Uri("https://ec-boaws2.menards.net/GuestEmailService/api/v1.0/"); } _guestEmailClient = guestEmailClient; }