Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
11/27/08 15:58:48 (16 years ago)
Author:
kgrading
Message:

implemented changes from (#398) and changed the server IP

File:
1 edited

Legend:

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

    r830 r840  
    146146      JobResult jobResult = new JobResult { JobId = jId, Result = sJob, Client = null };
    147147      clientCommunicator.SendJobResultAsync(jobResult, true);
    148 
    149       AppDomain.Unload(appDomains[jId]);
    150       appDomains.Remove(jId);
    151       engines.Remove(jId);
    152       Status.CurrentJobs--;
    153       Debug.WriteLine("Decrement CurrentJobs to:" + Status.CurrentJobs.ToString());       
    154 
    155148    }
    156149
     
    182175    }
    183176
    184     void ClientCommunicator_SendJobResultCompleted(object sender, SendJobResultCompletedEventArgs e) {     
    185       // TODO Removing of the Engines & AppDomains should happen here, not in the GetFinishedJob Method.
     177    void ClientCommunicator_SendJobResultCompleted(object sender, SendJobResultCompletedEventArgs e) {
     178      if (e.Result.Success) {
     179        AppDomain.Unload(appDomains[e.Result.JobId]);
     180        appDomains.Remove(e.Result.JobId);
     181        engines.Remove(e.Result.JobId);
     182        Status.CurrentJobs--;
     183        Debug.WriteLine("Decrement CurrentJobs to:" + Status.CurrentJobs.ToString());
     184      } else {
     185        Debug.WriteLine("Job sending FAILED!");
     186      }
    186187    }
    187188  }
Note: See TracChangeset for help on using the changeset viewer.