public void Run(HostArguments args)
        {
            var settings      = new Settings.Settings(args.ServiceName);
            var documentStore = new EmbeddableDocumentStore();

            new RavenBootstrapper().StartRaven(documentStore, settings, true);

            if (Environment.UserInteractive)
            {
                Console.Out.WriteLine("RavenDB is now accepting requests on {0}", settings.StorageUrl);
                Console.Out.WriteLine("RavenDB Maintenance Mode - Press Enter to exit");
                while (Console.ReadKey().Key != ConsoleKey.Enter)
                {
                }

                documentStore.Dispose();

                return;
            }

            using (var service = new MaintenanceHost(settings, documentStore))
            {
                service.Run();
            }
        }
Ejemplo n.º 2
0
        static TransportSettings MapSettings(Settings.Settings settings)
        {
            var transportSettings = new TransportSettings
            {
                EndpointName     = settings.ServiceName,
                ConnectionString = settings.TransportConnectionString,
                MaxConcurrency   = settings.MaximumConcurrencyLevel
            };

            return(transportSettings);
        }
 public RawEndpointFactory(Settings.Settings settings, TransportSettings transportSettings, TransportCustomization transportCustomization)
 {
     this.transportSettings      = transportSettings;
     this.settings               = settings;
     this.transportCustomization = transportCustomization;
 }
 public CheckFreeDiskSpace(Settings.Settings settings) : base("ServiceControl.Audit database", "Storage space", TimeSpan.FromMinutes(5))
 {
     dataPath            = settings.DbPath;
     percentageThreshold = settings.DataSpaceRemainingThreshold / 100m;
     Logger.Debug($"Check ServiceControl data drive space remaining custom check starting. Threshold {percentageThreshold:P0}");
 }
Ejemplo n.º 5
0
 public SetupBootstrapper(Settings.Settings settings)
 {
     this.settings = settings;
 }