| 489 | } |
| 490 | |
| 491 | Status PauseWorker(ServerContext*, const PauseWorkerRequest* req, |
| 492 | EmptyResponse*) override { |
| 493 | std::lock_guard<std::recursive_mutex> lock(mutex_); |
| 494 | |
| 495 | int wid = req->wid(); |
| 496 | // TODO: It should be made harder to wreak havoc on the rest of the daemon |
| 497 | // when using PauseWorker(). For now a warning and suggestion that this is |
| 498 | // for experts only is sufficient. |
| 499 | LOG(WARNING) << "PauseWorker() is an experimental operation and should be" |
| 500 | << " used with care. Long-term support not guaranteed."; |
| 501 | pause_worker(wid); |
| 502 | LOG(INFO) << "*** Worker " << wid << " has been paused ***"; |
| 503 | return Status::OK; |
| 504 | } |
| 505 | |
| 506 | Status ResumeAll(ServerContext*, const EmptyRequest*, |
| 507 | EmptyResponse*) override { |
nothing calls this directly
no test coverage detected