Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
11/27/12 19:57:06 (12 years ago)
Author:
ascheibe
Message:

#1986 added the ui components for shutting down slaves

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/SlaveShutdown/HeuristicLab.Clients.Hive.Slave/3.3/Core.cs

    r8949 r8953  
    2525using System.Threading;
    2626using System.Threading.Tasks;
    27 using HeuristicLab.Clients.Hive.SlaveCore.Properties;
    2827using HeuristicLab.Common;
    2928using HeuristicLab.Core;
     
    5352
    5453    public Core() {
    55       var log = new ThreadSafeLog(Settings.Default.MaxLogCount);
     54      var log = new ThreadSafeLog(SlaveCore.Properties.Settings.Default.MaxLogCount);
    5655      this.pluginManager = new PluginManager(WcfService.Instance, log);
    5756      this.taskManager = new TaskManager(pluginManager, log);
     
    454453
    455454    private void ShutdownComputer() {
    456       Shutdown();
    457 
    458       try {
    459         Process.Start(Settings.Default.ShutdownCommand);
    460       }
    461       catch (Exception ex) {
    462         if (ServiceEventLog != null) {
    463           EventLogManager.LogException(ex);
    464         } else
    465           throw ex;
    466       }
     455      var t = TS.Task.Factory.StartNew(new Action(Shutdown));
     456      t.ContinueWith(c => {
     457        try {
     458          Process.Start(SlaveCore.Properties.Settings.Default.ShutdownCommand);
     459        }
     460        catch (Exception ex) {
     461          if (ServiceEventLog != null) {
     462            EventLogManager.LogException(ex);
     463          } else
     464            throw ex;
     465        }
     466      });
    467467    }
    468468
Note: See TracChangeset for help on using the changeset viewer.