Free cookie consent management tool by TermsFeed Policy Generator

Changeset 940 for trunk


Ignore:
Timestamp:
12/10/08 14:15:00 (16 years ago)
Author:
msteinbi
Message:

Implementing ClientCommunicator (#399)

Location:
trunk/sources
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Hive.Contracts/ApplicationConstants.cs

    r937 r940  
    3131    public static string RESPONSE_COMMUNICATOR_LOGOUT_CLIENT_NOT_REGISTERED = "Communicator.LogoutClientNotRegistered";
    3232    public static string RESPONSE_COMMUNICATOR_LOGOUT_SUCCESS = "Logout.Success";
     33    public static string RESPONSE_COMMUNICATOR_NO_JOBS_LEFT = "Communicator.NoJobsLeft";
    3334
    3435  }
  • trunk/sources/HeuristicLab.Hive.Server.Core/ClientCommunicator.cs

    r934 r940  
    7070      ResponseJob response = new ResponseJob();
    7171      lock (this) {
    72         response.JobId = jobs.Last.Value;
    73         jobs.RemoveLast();
    74         response.SerializedJob = PersistenceManager.SaveToGZip(new TestJob());
     72        if (jobs.Last != null) {
     73          response.JobId = jobs.Last.Value;
     74          jobs.RemoveLast();
     75          response.SerializedJob = PersistenceManager.SaveToGZip(new TestJob());
     76          response.Success = true;
     77          response.StatusMessage = ApplicationConstants.RESPONSE_COMMUNICATOR_JOB_PULLED;
     78          return response;
     79        }
    7580      }
    76      
    7781      response.Success = true;
    78       response.StatusMessage = ApplicationConstants.RESPONSE_COMMUNICATOR_JOB_PULLED;
    79       return response;
     82      response.StatusMessage = ApplicationConstants.RESPONSE_COMMUNICATOR_NO_JOBS_LEFT;
    8083    }
    8184
Note: See TracChangeset for help on using the changeset viewer.