Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
06/05/09 14:40:53 (16 years ago)
Author:
kgrading
Message:

added calendar behavior in the whole application (#669)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Hive.Client.Core/3.2/JobStorage/JobStorageManager.cs

    r1959 r2025  
    4747          String filename = storedJobsList[index-1].ServerIP + "." + storedJobsList[index-1].ServerPort + "." + storedJobsList[index-1].JobID.ToString();         
    4848          Logging.Instance.Info("JobStorrageManager", "Sending stored job " + storedJobsList[index - 1].JobID + " to the server");
    49           byte[] job = File.ReadAllBytes(path + filename + ".dat");
    50 
    51           if (WcfService.Instance.IsJobStillNeeded(storedJobsList[index - 1].JobID).StatusMessage == ApplicationConstants.RESPONSE_COMMUNICATOR_SEND_JOBRESULT) {
    52             ResponseResultReceived res = WcfService.Instance.SendStoredJobResultsSync(ConfigManager.Instance.GetClientInfo().Id, storedJobsList[index - 1].JobID, job, 1.00, null, true);
    53             if (!res.Success)
    54               Logging.Instance.Error("JobStorageManager", "sending of job failed: " + res.StatusMessage);
    55             else
    56               Logging.Instance.Info("JobStorrageManager", "Sending of job " + storedJobsList[index - 1].JobID + " done");     
     49          try {
     50            byte[] job = File.ReadAllBytes(path + filename + ".dat");
     51            if (WcfService.Instance.IsJobStillNeeded(storedJobsList[index - 1].JobID).StatusMessage == ApplicationConstants.RESPONSE_COMMUNICATOR_SEND_JOBRESULT) {
     52              ResponseResultReceived res = WcfService.Instance.SendStoredJobResultsSync(ConfigManager.Instance.GetClientInfo().Id, storedJobsList[index - 1].JobID, job, 1.00, null, true);
     53              if (!res.Success)
     54                Logging.Instance.Error("JobStorageManager", "sending of job failed: " + res.StatusMessage);
     55              else
     56                Logging.Instance.Info("JobStorrageManager", "Sending of job " + storedJobsList[index - 1].JobID + " done");
     57            }
     58            ClientStatusInfo.JobsProcessed++;
     59            storedJobsList.Remove(storedJobsList[index - 1]);
     60            File.Delete(path + filename + ".dat");
    5761          }
    58           ClientStatusInfo.JobsProcessed++;
    59                  
    60          
    61 
    62           storedJobsList.Remove(storedJobsList[index - 1]);
    63           File.Delete(path + filename + ".dat");       
     62          catch (Exception e) {
     63            Logging.Instance.Error("JobStorrageManager", "Job not on hdd but on list - deleting job from list", e);
     64            storedJobsList.Remove(storedJobsList[index - 1]);
    6465          }
     66     
     67         }
    6568        }
    6669    }
Note: See TracChangeset for help on using the changeset viewer.