コード例 #1
0
        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();
            }
        }
コード例 #2
0
        static TransportSettings MapSettings(Settings.Settings settings)
        {
            var transportSettings = new TransportSettings
            {
                EndpointName     = settings.ServiceName,
                ConnectionString = settings.TransportConnectionString,
                MaxConcurrency   = settings.MaximumConcurrencyLevel
            };

            return(transportSettings);
        }
コード例 #3
0
 public RawEndpointFactory(Settings.Settings settings, TransportSettings transportSettings, TransportCustomization transportCustomization)
 {
     this.transportSettings      = transportSettings;
     this.settings               = settings;
     this.transportCustomization = transportCustomization;
 }
コード例 #4
0
 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}");
 }
コード例 #5
0
 public SetupBootstrapper(Settings.Settings settings)
 {
     this.settings = settings;
 }