| 42 | } |
| 43 | |
| 44 | void Worker::GetStatusAsyncWithOptions(const GetStatusRequest* request, |
| 45 | GetStatusResponse* response, |
| 46 | StatusCallback done, |
| 47 | CallOptions* call_opts) { |
| 48 | DeviceMgr* dm = env_->device_mgr; |
| 49 | std::vector<DeviceAttributes> devices; |
| 50 | dm->ListDeviceAttributes(&devices); |
| 51 | response->mutable_device_attributes()->Reserve(devices.size()); |
| 52 | for (auto& d : devices) { |
| 53 | response->add_device_attributes()->Swap(&d); |
| 54 | } |
| 55 | done(Status::OK()); |
| 56 | } |
| 57 | |
| 58 | void Worker::CreateWorkerSessionAsync(const CreateWorkerSessionRequest* request, |
| 59 | CreateWorkerSessionResponse* response, |
no test coverage detected