Ejemplo n.º 1
0
 public void Dispose()
 {
     Stop();
     HerculesDeployer.Cleanup(this);
     KafkaInstance?.Dispose();
     ZooKeeperEnsemble?.Dispose();
 }
Ejemplo n.º 2
0
        public static HerculesCluster DeployNew(HerculesDeploySettings deploySettings, ILog log, bool started = true)
        {
            HerculesCluster cluster = null;

            Retrier.RetryOnException(() =>
            {
                cluster = new HerculesDeployer(deploySettings, log).Deploy();

                if (started)
                {
                    cluster.Start();
                }
            },
                                     3,
                                     "Unable to start Hercules.Local",
                                     () =>
            {
                log.Warn("Retrying Hercules.Local deployment...");
                cluster?.Dispose();
            });

            return(cluster);
        }