- Timestamp:
- 04/30/09 15:31:47 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Hive.Client.Core/3.2/JobStorage/JobStorageManager.cs
r1449 r1728 8 8 using HeuristicLab.Hive.Client.Core.ConfigurationManager; 9 9 using HeuristicLab.Hive.Contracts; 10 using System.Xml.Serialization; 10 11 11 12 namespace HeuristicLab.Hive.Client.Core.JobStorage { … … 19 20 public static void PersistObjectToDisc(String serverIP, long serverPort, Guid jobId, byte[] job) { 20 21 String filename = serverIP + "." + serverPort + "." + jobId.ToString(); 22 JobStorageInfo info = new JobStorageInfo { JobID = jobId, ServerIP = serverIP, ServerPort = serverPort, TimeFinished = DateTime.Now }; 21 23 22 JobStorageInfo info = new JobStorageInfo { JobID = jobId, ServerIP = serverIP, ServerPort = serverPort, TimeFinished = DateTime.Now }; 24 if (!Directory.Exists(path)) 25 Directory.CreateDirectory(path); 23 26 24 27 Stream jobstream = null; … … 36 39 jobstream.Close(); 37 40 } 41 42 StoreJobList(); 43 38 44 } 39 45 … … 54 60 55 61 // } 62 } 56 63 } 57 }58 64 } 65 66 public static void StoreJobList() { 67 XmlSerializer serializer = new XmlSerializer(typeof(List<JobStorageInfo>)); 68 TextWriter writer = new StreamWriter(path + "list.xml"); 69 serializer.Serialize(writer, storedJobsList); 70 } 71 59 72 } 60 73 }
Note: See TracChangeset
for help on using the changeset viewer.