public void Dispose() { Stop(); HerculesDeployer.Cleanup(this); KafkaInstance?.Dispose(); ZooKeeperEnsemble?.Dispose(); }
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); }