Free cookie consent management tool by TermsFeed Policy Generator

Changeset 5789


Ignore:
Timestamp:
03/22/11 14:11:11 (14 years ago)
Author:
ascheibe
Message:

#1233

  • added autostart for tray icon to installer
  • machine unique id now includes the machine name
  • core: check if job already exists on slave
  • already finished jobs now fail and are sent back
Location:
branches/HeuristicLab.Hive-3.4/sources
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave.SlaveWindowsServiceSetup/HeuristicLab.Clients.Hive.Slave.SlaveWindowsServiceSetup.vdproj

    r5780 r5789  
    28272827                "Folders"
    28282828                {
     2829                    "{9EF0B969-E518-4E46-987F-47570745A589}:_1CAB3452A07143398B4B614C5E7BFBF1"
     2830                    {
     2831                    "Name" = "8:Startup"
     2832                    "AlwaysCreate" = "11:FALSE"
     2833                    "Condition" = "8:"
     2834                    "Transitive" = "11:FALSE"
     2835                    "Property" = "8:_44D8CB6B7BF4473FB08F71EF2CABE42F"
     2836                        "Folders"
     2837                        {
     2838                        }
     2839                    }
    28292840                    "{9EF0B969-E518-4E46-987F-47570745A589}:_EB172448DA454A1EACE198BCA7BC8A03"
    28302841                    {
     
    28572868        "ProductName" = "8:HeuristicLab Hive Slave"
    28582869        "ProductCode" = "8:{83D128A1-4766-4B19-A449-15B0A1969B99}"
    2859         "PackageCode" = "8:{E16E0DDF-7849-45C1-8379-6F7070E7248C}"
     2870        "PackageCode" = "8:{C4FAB079-1A52-4750-8B10-308DD1D8A0EE}"
    28602871        "UpgradeCode" = "8:{F27A07F7-B96C-4375-B9C2-6623E5C2B03E}"
    28612872        "AspNetVersion" = "8:4.0.30319.0"
     
    29872998            "Target" = "8:_E425C85EBBC047D2944046574F2FB159"
    29882999            "Folder" = "8:_EB172448DA454A1EACE198BCA7BC8A03"
     3000            "WorkingFolder" = "8:_8564EC48868C45BDB6F26256DBC6B288"
     3001            "Icon" = "8:_98295B7BD0CC41ED881E9A9207EF6DB4"
     3002            "Feature" = "8:"
     3003            }
     3004            "{970C0BB2-C7D0-45D7-ABFA-7EC378858BC0}:_3B4D8FB05FCC4E9A908C03F543D4D3B2"
     3005            {
     3006            "Name" = "8:HeuristicLab Hive Slave"
     3007            "Arguments" = "8:"
     3008            "Description" = "8:"
     3009            "ShowCmd" = "3:1"
     3010            "IconIndex" = "3:0"
     3011            "Transitive" = "11:FALSE"
     3012            "Target" = "8:_E425C85EBBC047D2944046574F2FB159"
     3013            "Folder" = "8:_1CAB3452A07143398B4B614C5E7BFBF1"
    29893014            "WorkingFolder" = "8:_8564EC48868C45BDB6F26256DBC6B288"
    29903015            "Icon" = "8:_98295B7BD0CC41ED881E9A9207EF6DB4"
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave.Views/3.4/HeuristicLab.Clients.Hive.Slave.Views-3.4.csproj

    r5602 r5789  
    119119    <Reference Include="System.ServiceProcess" />
    120120    <Reference Include="System.Windows.Forms" />
     121    <Reference Include="System.Windows.Forms.DataVisualization" />
    121122    <Reference Include="System.Xml.Linq" />
    122123    <Reference Include="System.Data.DataSetExtensions" />
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave.Views/3.4/SlaveView.Designer.cs

    r5602 r5789  
    4545    /// </summary>
    4646    private void InitializeComponent() {
    47       this.label1 = new System.Windows.Forms.Label();
     47      System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea1 = new System.Windows.Forms.DataVisualization.Charting.ChartArea();
     48      System.Windows.Forms.DataVisualization.Charting.Legend legend1 = new System.Windows.Forms.DataVisualization.Charting.Legend();
     49      System.Windows.Forms.DataVisualization.Charting.Series series1 = new System.Windows.Forms.DataVisualization.Charting.Series();
    4850      this.txtLog = new System.Windows.Forms.TextBox();
    4951      this.btnPauseAll = new System.Windows.Forms.Button();
     
    5254      this.btnSleep = new System.Windows.Forms.Button();
    5355      this.btnAbout = new System.Windows.Forms.Button();
     56      this.jobChart = new System.Windows.Forms.DataVisualization.Charting.Chart();
     57      ((System.ComponentModel.ISupportInitialize)(this.jobChart)).BeginInit();
    5458      this.SuspendLayout();
    55       //
    56       // label1
    57       //
    58       this.label1.AutoSize = true;
    59       this.label1.Location = new System.Drawing.Point(17, 24);
    60       this.label1.Name = "label1";
    61       this.label1.Size = new System.Drawing.Size(85, 13);
    62       this.label1.TabIndex = 0;
    63       this.label1.Text = "Hive Slave View";
    6459      //
    6560      // txtLog
    6661      //
    6762      this.txtLog.BackColor = System.Drawing.Color.White;
    68       this.txtLog.Location = new System.Drawing.Point(20, 172);
     63      this.txtLog.Location = new System.Drawing.Point(3, 150);
    6964      this.txtLog.Multiline = true;
    7065      this.txtLog.Name = "txtLog";
    7166      this.txtLog.ReadOnly = true;
    7267      this.txtLog.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
    73       this.txtLog.Size = new System.Drawing.Size(546, 244);
     68      this.txtLog.Size = new System.Drawing.Size(584, 273);
    7469      this.txtLog.TabIndex = 1;
    7570      //
    7671      // btnPauseAll
    7772      //
    78       this.btnPauseAll.Location = new System.Drawing.Point(455, 24);
     73      this.btnPauseAll.Location = new System.Drawing.Point(476, 3);
    7974      this.btnPauseAll.Name = "btnPauseAll";
    80       this.btnPauseAll.Size = new System.Drawing.Size(111, 23);
     75      this.btnPauseAll.Size = new System.Drawing.Size(111, 28);
    8176      this.btnPauseAll.TabIndex = 2;
    8277      this.btnPauseAll.Text = "Pause all jobs";
     
    8681      // btnStopAll
    8782      //
    88       this.btnStopAll.Location = new System.Drawing.Point(455, 53);
     83      this.btnStopAll.Location = new System.Drawing.Point(476, 32);
    8984      this.btnStopAll.Name = "btnStopAll";
    90       this.btnStopAll.Size = new System.Drawing.Size(111, 23);
     85      this.btnStopAll.Size = new System.Drawing.Size(111, 28);
    9186      this.btnStopAll.TabIndex = 3;
    9287      this.btnStopAll.Text = "Stop all jobs";
     
    9691      // btnRestart
    9792      //
    98       this.btnRestart.Location = new System.Drawing.Point(455, 111);
     93      this.btnRestart.Location = new System.Drawing.Point(476, 90);
    9994      this.btnRestart.Name = "btnRestart";
    100       this.btnRestart.Size = new System.Drawing.Size(111, 23);
     95      this.btnRestart.Size = new System.Drawing.Size(111, 28);
    10196      this.btnRestart.TabIndex = 4;
    10297      this.btnRestart.Text = "Restart Core";
     
    106101      // btnSleep
    107102      //
    108       this.btnSleep.Location = new System.Drawing.Point(455, 82);
     103      this.btnSleep.Location = new System.Drawing.Point(476, 61);
    109104      this.btnSleep.Name = "btnSleep";
    110       this.btnSleep.Size = new System.Drawing.Size(111, 23);
     105      this.btnSleep.Size = new System.Drawing.Size(111, 28);
    111106      this.btnSleep.TabIndex = 5;
    112107      this.btnSleep.Text = "Send slave to sleep";
     
    116111      // btnAbout
    117112      //
    118       this.btnAbout.Location = new System.Drawing.Point(455, 140);
     113      this.btnAbout.Location = new System.Drawing.Point(476, 119);
    119114      this.btnAbout.Name = "btnAbout";
    120       this.btnAbout.Size = new System.Drawing.Size(111, 23);
     115      this.btnAbout.Size = new System.Drawing.Size(111, 28);
    121116      this.btnAbout.TabIndex = 6;
    122117      this.btnAbout.Text = "About Hive";
     
    124119      this.btnAbout.Click += new System.EventHandler(this.btnAbout_Click);
    125120      //
     121      // jobChart
     122      //
     123      chartArea1.Name = "ChartArea1";
     124      this.jobChart.ChartAreas.Add(chartArea1);
     125      legend1.Name = "Legend1";
     126      this.jobChart.Legends.Add(legend1);
     127      this.jobChart.Location = new System.Drawing.Point(3, 3);
     128      this.jobChart.Name = "jobChart";
     129      series1.ChartArea = "ChartArea1";
     130      series1.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Doughnut;
     131      series1.Legend = "Legend1";
     132      series1.Name = "Series1";
     133      this.jobChart.Series.Add(series1);
     134      this.jobChart.Size = new System.Drawing.Size(272, 138);
     135      this.jobChart.TabIndex = 7;
     136      //
    126137      // SlaveView
    127138      //
    128139      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
    129140      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
     141      this.Controls.Add(this.jobChart);
    130142      this.Controls.Add(this.btnAbout);
    131143      this.Controls.Add(this.btnSleep);
     
    134146      this.Controls.Add(this.btnPauseAll);
    135147      this.Controls.Add(this.txtLog);
    136       this.Controls.Add(this.label1);
    137148      this.Name = "SlaveView";
    138       this.Size = new System.Drawing.Size(590, 435);
     149      this.Size = new System.Drawing.Size(590, 426);
     150      ((System.ComponentModel.ISupportInitialize)(this.jobChart)).EndInit();
    139151      this.ResumeLayout(false);
    140152      this.PerformLayout();
     
    144156    #endregion
    145157
    146     private System.Windows.Forms.Label label1;
    147158    private System.Windows.Forms.TextBox txtLog;
    148159    private System.Windows.Forms.Button btnPauseAll;
     
    151162    private System.Windows.Forms.Button btnSleep;
    152163    private System.Windows.Forms.Button btnAbout;
     164    private System.Windows.Forms.DataVisualization.Charting.Chart jobChart;
    153165  }
    154166}
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave.Views/3.4/SlaveView.cs

    r5602 r5789  
    2121
    2222using System.Windows.Forms;
     23using System.Windows.Forms.DataVisualization.Charting;
    2324using HeuristicLab.Common;
    2425using HeuristicLab.Core.Views;
     
    8384    void Content_SlaveStatusChanged(object sender, EventArgs<StatusCommons> e) {
    8485      txtLog.AppendText("got a status changed object from slave\n");
     86      RenderChart(e.Value);
    8587    }
    8688
     
    9395    }
    9496    #endregion
     97
     98    private void RenderChart(StatusCommons status) {
     99
     100      DataPoint pJobs = new DataPoint(status.Jobs.Count, status.Jobs.Count);
     101      DataPoint pJobsAborted = new DataPoint(status.JobsAborted, status.JobsAborted);
     102      DataPoint pJobsDone = new DataPoint(status.JobsDone, status.JobsDone);
     103      DataPoint pJobsFetched = new DataPoint(status.JobsFetched, status.JobsFetched);
     104
     105      jobChart.Series[0].Points.Add(pJobs);
     106      jobChart.Series[0].Points.Add(pJobsAborted);
     107      jobChart.Series[0].Points.Add(pJobsDone);
     108      jobChart.Series[0].Points.Add(pJobsFetched);
     109    }
    95110
    96111    private void btnSoftPause_Click(object sender, System.EventArgs e) {
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave/3.4/ConfigManager.cs

    r5711 r5789  
    2929namespace HeuristicLab.Clients.Hive.SlaveCore {
    3030  /// <summary>
    31   /// accesses the Server and sends his data (uuid, uptimes, hardware config)
     31  /// accesses the server and sends his data (uuid, uptimes, hardware config)
    3232  /// </summary>
    3333  public class ConfigManager {
     
    6565    /// <returns>the ClientInfo object</returns>
    6666    public Slave GetClientInfo() {
    67       //TODO: how to display connectedsince in gui?
    68       //hardwareInfo.Login = WcfService.Instance.ConnectedSince;
    6967      return slave;
    7068    }
     
    7573    /// <returns></returns>
    7674    public StatusCommons GetStatusForClientConsole() {
    77       //Todo: Locking
    7875      StatusCommons st = new StatusCommons();
    7976      st.ClientGuid = slave.Id;
     
    143140
    144141    /// <summary>
    145     /// MegaBytes
     142    /// returns total physical memory of the machine in MB
    146143    /// </summary>
    147144    private static int? GetPhysicalMemory() {
     
    154151
    155152    /// <summary>
    156     /// Mhz
     153    /// returns CPU frequence of the machine in Mhz
    157154    /// </summary>
    158155    private static int? GetCpuSpeed() {
     
    189186                }
    190187
    191                 Guid guid = new Guid(0, 0, 0, b);
     188                // also get machine name and save it to the first 4 bytes               
     189                Guid guid = new Guid(Environment.MachineName.GetHashCode(), 0, 0, b);
    192190                return guid;
    193191              } else
     
    239237    }
    240238
     239    /// <summary>
     240    /// returns free memory of machine in MB
     241    /// </summary>   
    241242    public static int GetFreeMemory() {
    242243      int mb = 0;
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave/3.4/Core.cs

    r5786 r5789  
    438438    private void StartJobInAppDomain(Job myJob, JobData jobData) {
    439439      clientCom.LogMessage("Received new job with id " + myJob.Id);
     440      if (engines.ContainsKey(myJob.Id))
     441        throw new Exception("Job with key " + myJob.Id + " already exists");
     442
    440443      String pluginDir = Path.Combine(PluginCache.Instance.PluginTempBaseDir, myJob.Id.ToString());
    441444      bool pluginsPrepared = false;
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave/3.4/Executor.cs

    r5782 r5789  
    8282      catch (Exception e) {
    8383        this.currentException = e;
     84        Job_JobFailed(this, new HeuristicLab.Common.EventArgs<Exception>(e));
    8485      }
    8586    }
Note: See TracChangeset for help on using the changeset viewer.