mirror of
				https://github.com/ciphervance/supercell-wx.git
				synced 2025-10-31 04:50:06 +00:00 
			
		
		
		
	Support ARCHIVE2
This commit is contained in:
		
							parent
							
								
									243a7c870c
								
							
						
					
					
						commit
						636f444c40
					
				
					 2 changed files with 13 additions and 9 deletions
				
			
		|  | @ -231,7 +231,8 @@ public: | |||
|    LoadNexradFile(CreateNexradFileFunction                    load, | ||||
|                   std::shared_ptr<request::NexradFileRequest> request, | ||||
|                   std::mutex&                                 mutex, | ||||
|                   std::chrono::system_clock::time_point       time = {}); | ||||
|                   std::chrono::system_clock::time_point       time    = {}, | ||||
|                   const std::string&                          radarId = {}); | ||||
| 
 | ||||
|    const std::string radarId_; | ||||
|    bool              initialized_; | ||||
|  | @ -957,14 +958,15 @@ void RadarProductManagerImpl::LoadNexradFileAsync( | |||
| { | ||||
|    boost::asio::post(threadPool_, | ||||
|                      [=, &mutex]() | ||||
|                      { LoadNexradFile(load, request, mutex, time); }); | ||||
|                      { LoadNexradFile(load, request, mutex, time, radarId_); }); | ||||
| } | ||||
| 
 | ||||
| void RadarProductManagerImpl::LoadNexradFile( | ||||
|    CreateNexradFileFunction                    load, | ||||
|    std::shared_ptr<request::NexradFileRequest> request, | ||||
|    std::mutex&                                 mutex, | ||||
|    std::chrono::system_clock::time_point       time) | ||||
|    std::chrono::system_clock::time_point       time, | ||||
|    const std::string&                          radarId) | ||||
| { | ||||
|    std::unique_lock lock {mutex}; | ||||
| 
 | ||||
|  | @ -987,8 +989,14 @@ void RadarProductManagerImpl::LoadNexradFile( | |||
|          record->set_time(time); | ||||
|       } | ||||
| 
 | ||||
|       std::string recordRadarId = (record->radar_id()); | ||||
|       if (recordRadarId.empty()) | ||||
|       { | ||||
|          recordRadarId = radarId; | ||||
|       } | ||||
| 
 | ||||
|       std::shared_ptr<RadarProductManager> manager = | ||||
|          RadarProductManager::Instance(record->radar_id()); | ||||
|          RadarProductManager::Instance(recordRadarId); | ||||
| 
 | ||||
|       manager->Initialize(); | ||||
|       record = manager->p->StoreRadarProductRecord(record); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Dan Paulat
						Dan Paulat