Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
08/24/10 18:37:04 (14 years ago)
Author:
cneumuel
Message:

added streamedHttpEndpoit binding (without message-security (for now)) (#1168)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Core/3.3/SlaveCommunicator.cs

    r4289 r4305  
    176176    /// <param name="slaveInfo"></param>
    177177    /// <returns></returns>
    178     public Response Login(Guid slaveId) {
     178    public Response Login(SlaveDto slave) {
    179179      Response response = new Response();
    180180
    181181      heartbeatLock.EnterWriteLock();
    182       if (lastHeartbeats.ContainsKey(slaveId)) {
    183         lastHeartbeats[slaveId] = DateTime.Now;
     182      if (lastHeartbeats.ContainsKey(slave.Id)) {
     183        lastHeartbeats[slave.Id] = DateTime.Now;
    184184      } else {
    185         lastHeartbeats.Add(slaveId, DateTime.Now);
     185        lastHeartbeats.Add(slave.Id, DateTime.Now);
    186186      }
    187187      heartbeatLock.ExitWriteLock();
    188188
    189       SlaveDto dbSlave = DaoLocator.SlaveDao.FindById(slaveId);
    190 
    191       //Really set offline?
    192       //Reconnect issues with the currently calculating jobs
    193       dbSlave.State = SlaveState.Idle;
    194       dbSlave.CalendarSyncStatus = dbSlave != null ? dbSlave.CalendarSyncStatus : CalendarState.NotAllowedToFetch;
     189      SlaveDto dbSlave = DaoLocator.SlaveDao.FindById(slave.Id);
     190
     191      slave.CalendarSyncStatus = dbSlave != null ? dbSlave.CalendarSyncStatus : CalendarState.NotAllowedToFetch;
     192      slave.State = SlaveState.Idle;
    195193
    196194      if (dbSlave == null)
    197         DaoLocator.SlaveDao.Insert(dbSlave);
    198       else
    199         DaoLocator.SlaveDao.Update(dbSlave);
     195        DaoLocator.SlaveDao.Insert(slave);
     196      else {
     197        DaoLocator.SlaveDao.Update(slave);
     198      }
    200199
    201200      return response;
Note: See TracChangeset for help on using the changeset viewer.