protected override void OnStop() { if (heartbeatTimer != null) { heartbeatTimer.Dispose(); heartbeatTimer = null; } O.eachValue(processes, killIfNeeded); processes.Clear(); }
internal void run() { loadSharedDrives(); LogC.useJavaLog = true; LogC.setOut("launcher", @"C:\logs\LiveLauncher.log", true); try { O.wait(() => !FerretControl.status().Equals("Unknown")); } catch (Exception e) { Email.problem("Cannot start Tomahawk - Ferret is DOWN?", "Cannot get Ferret status. Is it down?").sendTo("live"); Bomb.toss("Cannot get Ferret status", e); } Console.CancelKeyPress += (sender, unused) => O.eachValue(processes, killIfNeeded); killTopic().subscribe(kill); restartTopic().subscribe(restart); initiateHeartbeat(); }