Ignore:
Timestamp:
09/19/22 10:38:09 (21 months ago)
Author:
ymipsl
Message:

Add the possibility to launch a service on same ressource than an other.
YM

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS3/trunk/src/manager/services_manager.cpp

    r2403 r2404  
    7676  } 
    7777 
    78   bool CServicesManager::createServicesOnto(const std::string& poolId, const std::string& serviceId, const std::string& OnServiceId, bool wait) 
     78  bool CServicesManager::createServicesOnto(const std::string& poolId, const std::string& serviceId, int type, const std::string& OnServiceId, bool wait) 
    7979  { 
    8080 
     
    9696    { 
    9797      info(40)<<"CServicesManager : create service on other, notification to leader "<<leader<<", serviceId : "<<serviceId<<", service onto : "<<OnServiceId<<endl ; 
    98       createServicesOntoNotify(leader, serviceId, OnServiceId) ; 
     98      createServicesOntoNotify(leader, serviceId, type, OnServiceId) ; 
    9999      return true ; 
    100100    } 
     
    110110 
    111111 
    112   void CServicesManager::createServicesOntoNotify(int rank, const string& serviceId, const string& OnServiceId) 
     112  void CServicesManager::createServicesOntoNotify(int rank, const string& serviceId, int type, const string& OnServiceId) 
    113113  { 
    114114    notifyType_=NOTIFY_CREATE_SERVICE_ONTO ; 
    115     notifyCreateServiceOnto_=make_tuple(serviceId, OnServiceId) ; 
     115    notifyCreateServiceOnto_=make_tuple(serviceId, type, OnServiceId) ; 
    116116    sendNotification(rank) ; 
    117117  } 
     
    160160  void CServicesManager::createServiceOnto(void) 
    161161  { 
    162     auto& arg=notifyCreateService_ ; 
    163     //CServer::getServersRessource()->getPoolRessource()->createService(get<0>(arg), get<1>(arg), get<2>(arg), get<3>(arg)) ; 
     162    auto& arg=notifyCreateServiceOnto_ ; 
     163    CServer::getServersRessource()->getPoolRessource()->createServiceOnto(get<0>(arg), get<1>(arg), get<2>(arg)) ; 
    164164  } 
    165165 
     
    177177    { 
    178178      auto& arg=notifyCreateServiceOnto_ ; 
    179       buffer << notifyType_<< get<0>(arg) << get<1>(arg) ; 
     179      buffer << notifyType_<< get<0>(arg) << get<1>(arg) << get<2>(arg) ; 
    180180    } 
    181181  } 
     
    195195      { 
    196196        auto& arg=notifyCreateServiceOnto_ ; 
    197         buffer >> get<0>(arg) >> get<1>(arg) ; 
     197        buffer >> get<0>(arg) >> get<1>(arg) >> get<2>(arg) ; 
    198198      } 
    199199    } 
Note: See TracChangeset for help on using the changeset viewer.