- Timestamp:
- 03/05/09 17:55:17 (16 years ago)
- Location:
- trunk/sources/HeuristicLab.Hive.Client.Core
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Hive.Client.Core/Core.cs
r1255 r1260 253 253 void wcfService_Connected(object sender, EventArgs e) { 254 254 wcfService.LoginSync(ConfigManager.Instance.GetClientInfo()); 255 JobStorrageManager.CheckAndSubmitJobsFromDisc(); 255 256 } 256 257 -
trunk/sources/HeuristicLab.Hive.Client.Core/JobStorrage/JobStorrageManager.cs
r1219 r1260 4 4 using System.Text; 5 5 using System.IO; 6 using HeuristicLab.Hive.Client.Common; 7 using HeuristicLab.Hive.Client.Communication; 6 8 7 9 namespace HeuristicLab.Hive.Client.Core.JobStorrage { … … 10 12 11 13 public static void PersistObjectToDisc(String serverIP, long serverPort, long jobId, byte[] job) { 12 String filename = serverIP + serverPort+ jobId.ToString();14 String filename = serverIP + "." + serverPort + "." + jobId.ToString(); 13 15 14 16 JobStorrageInfo info = new JobStorrageInfo { JobID = jobId, ServerIP = serverIP, ServerPort = serverPort, TimeFinished = DateTime.Now }; 15 17 try { 16 Stream jobstream = File.Create(" jobStorrage\\"+filename + ".dat");18 Stream jobstream = File.Create("C:\\Program Files\\HeuristicLab 3.0\\plugins\\jobStorrage\\ "+filename + ".dat"); 17 19 jobstream.Write(job, 0, job.Length); 18 20 StoredJobsList.Add(info); 19 21 jobstream.Close(); 22 Logging.GetInstance().Info("JobStorrageManager", "Job " + info.JobID + " stored on the harddisc"); 20 23 } 21 24 catch (Exception e) { … … 23 26 } 24 27 } 28 29 public static void CheckAndSubmitJobsFromDisc() { 30 foreach (JobStorrageInfo info in StoredJobsList) { 31 if (WcfService.Instance.ConnState == NetworkEnum.WcfConnState.Loggedin && (info.ServerIP == WcfService.Instance.ServerIP && info.ServerPort == WcfService.Instance.ServerPort)) { 32 Logging.GetInstance().Info("JobStorrageManager", "Sending stored job " + info.JobID + " to the server"); 33 } 34 } 35 } 25 36 } 26 37 }
Note: See TracChangeset
for help on using the changeset viewer.