Changeset 375 for trunk/sources/HeuristicLab.CEDMA.Server/ServerForm.cs
- Timestamp:
- 07/09/08 21:37:36 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.CEDMA.Server/ServerForm.cs
r372 r375 36 36 using System.Data.Common; 37 37 using System.Threading; 38 using HeuristicLab.Grid; 38 39 39 40 namespace HeuristicLab.CEDMA.Server { … … 45 46 public ServerForm() { 46 47 InitializeComponent(); 47 InitDatabase();48 InitAgentScheduler();49 50 48 // windows XP returns the external ip on index 0 while windows vista returns the external ip on index 2 51 49 if (System.Environment.OSVersion.Version.Major >= 6) { … … 54 52 addressTextBox.Text = "net.tcp://" + Dns.GetHostAddresses(Dns.GetHostName())[0] + ":8002/CEDMA/World"; 55 53 } 56 Start();57 54 } 58 55 59 56 private void InitAgentScheduler() { 60 57 AgentScheduler scheduler = new AgentScheduler(database); 58 ThreadPool.QueueUserWorkItem(delegate(object status) { scheduler.Run(); }); 59 } 60 61 private void InitRunScheduler() { 62 JobManager jobManager = new JobManager(gridAddress.Text); 63 RunScheduler scheduler = new RunScheduler(database, jobManager); 61 64 ThreadPool.QueueUserWorkItem(delegate(object status) { scheduler.Run(); }); 62 65 } … … 74 77 75 78 private void Start() { 79 InitDatabase(); 80 InitAgentScheduler(); 81 InitRunScheduler(); 82 76 83 host = new ServiceHost(database, new Uri(addressTextBox.Text)); 77 84 ServiceThrottlingBehavior throttlingBehavior = new ServiceThrottlingBehavior(); … … 95 102 private void statusUpdateTimer_Tick(object sender, EventArgs e) { 96 103 } 104 105 private void startButton_Click(object sender, EventArgs e) { 106 Start(); 107 startButton.Enabled = false; 108 } 97 109 } 98 110 }
Note: See TracChangeset
for help on using the changeset viewer.