Changeset 4810 for branches/HeuristicLab.Hive/sources/HeuristicLab.Hive/HeuristicLab.Hive.Slave.Console
- Timestamp:
- 11/16/10 14:31:52 (14 years ago)
- Location:
- branches/HeuristicLab.Hive/sources/HeuristicLab.Hive/HeuristicLab.Hive.Slave.Console/3.3
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Hive/sources/HeuristicLab.Hive/HeuristicLab.Hive.Slave.Console/3.3/HiveSlaveConsole.cs
r4772 r4810 104 104 private void InitLogFileReader() { 105 105 //logFileReader = new LogFileReader(AppDomain.CurrentDomain.BaseDirectory + @"/Hive.Slave.log"); 106 logFileReader = new LogServiceReader( slaveCommunicator);106 logFileReader = new LogServiceReader(); 107 107 logFileReader.MoreData += new MoreDataHandler(logFileReader_MoreData); 108 108 logFileReader.Start(); … … 524 524 isfired = true; 525 525 refreshTimer.Stop(); 526 DialogResult res = MessageBox.Show(body, caption, MessageBoxButtons.OK, MessageBoxIcon.Error); 526 527 DialogResult res; 528 if (e != null) { 529 res = MessageBox.Show(body + "\n" + e.Message + ": " + e.StackTrace, caption, MessageBoxButtons.OK, MessageBoxIcon.Error); 530 } else { 531 res = MessageBox.Show(body + " (no exception available)", caption, MessageBoxButtons.OK, MessageBoxIcon.Error); 532 } 527 533 if (res == DialogResult.OK) 528 534 this.Close(); -
branches/HeuristicLab.Hive/sources/HeuristicLab.Hive/HeuristicLab.Hive.Slave.Console/3.3/LogServiceReader.cs
r4772 r4810 5 5 using System.Windows.Forms; 6 6 using HeuristicLab.Core; 7 using HeuristicLab.Hive.Slave.Console.SlaveConsoleService; 7 8 8 9 namespace HeuristicLab.Hive.Slave.Console { 9 10 internal class LogServiceReader : ILogReader { 10 11 11 private SlaveConsoleService.SlaveConsoleCommunicatorClient slaveCommunicator;12 12 private Timer timer; 13 13 private int messageCount = 0; 14 14 15 public LogServiceReader(SlaveConsoleService.SlaveConsoleCommunicatorClient slaveCommunicator) { 16 this.slaveCommunicator = slaveCommunicator; 15 public LogServiceReader() { 17 16 } 18 17 … … 26 25 void timer_Tick(object sender, EventArgs e) { 27 26 try { 28 var messages = slaveCommunicator.GetLogMessages(); 29 var newMessages = messages.GetRange(messageCount, messages.Count - messageCount); 30 messageCount = messages.Count; 31 OnMoreData(newMessages); 27 using (var slaveClient = new SlaveConsoleCommunicatorClient()) { 28 var messages = slaveClient.GetLogMessages(); 29 if (messages.Count < messageCount) { 30 messageCount = 0; // log got cleared 31 } 32 var newMessages = messages.GetRange(messageCount, messages.Count - messageCount); 33 messageCount = messages.Count; 34 OnMoreData(newMessages); 35 } 32 36 } 33 37 catch { } -
branches/HeuristicLab.Hive/sources/HeuristicLab.Hive/HeuristicLab.Hive.Slave.Console/3.3/app.config
r4710 r4810 17 17 <netTcpBinding> 18 18 <binding name="SlaveConsoleTcpEndpoint" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" transactionFlow="false" transferMode="Buffered" transactionProtocol="OleTransactions" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="524288" maxBufferSize="65536" maxReceivedMessageSize="65536"> 19 <readerQuotas maxDepth="32" maxStringContentLength=" 8192" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384"/>19 <readerQuotas maxDepth="32" maxStringContentLength="104857600" maxArrayLength="104857600" maxBytesPerRead="104857600" maxNameTableCharCount="104857600"/> 20 20 <reliableSession ordered="true" inactivityTimeout="00:10:00" enabled="false"/> 21 21 <security mode="None">
Note: See TracChangeset
for help on using the changeset viewer.