Changeset 1719


Ignore:
Timestamp:
04/30/09 13:45:41 (12 years ago)
Author:
kgrading
Message:

added protection from getting too many jobs (#467)

File:
1 edited

Legend:

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

    r1715 r1719  
    5151  public class Core: MarshalByRefObject {       
    5252    public static bool abortRequested { get; set; }
     53    private bool currentlyFetching = false;
    5354
    5455    private Dictionary<Guid, Executor> engines = new Dictionary<Guid, Executor>();
     
    128129          break;
    129130        //Pull a Job from the Server
    130         case MessageContainer.MessageType.FetchJob:
    131           wcfService.SendJobAsync(ConfigManager.Instance.GetClientInfo().Id);
     131        case MessageContainer.MessageType.FetchJob:
     132          if (!currentlyFetching) {
     133            wcfService.SendJobAsync(ConfigManager.Instance.GetClientInfo().Id);
     134            currentlyFetching = false;
     135          }         
    132136          break;         
    133137        //A Job has finished and can be sent back to the server
Note: See TracChangeset for help on using the changeset viewer.