Search in sources :

Example 1 with ProcessRequest

use of com.walmartlabs.concord.server.queueclient.message.ProcessRequest in project concord by walmartlabs.

the class Agent method take.

private JobRequest take(QueueClient queueClient) throws Exception {
    Future<ProcessResponse> req = queueClient.request(new ProcessRequest(agentCfg.getCapabilities()));
    ProcessResponse resp = req.get();
    if (resp == null) {
        return null;
    }
    Path workDir = IOUtils.createTempDir(agentCfg.getPayloadDir(), "workDir");
    return JobRequest.from(resp, workDir);
}
Also used : Path(java.nio.file.Path) ProcessRequest(com.walmartlabs.concord.server.queueclient.message.ProcessRequest) ProcessResponse(com.walmartlabs.concord.server.queueclient.message.ProcessResponse)

Aggregations

ProcessRequest (com.walmartlabs.concord.server.queueclient.message.ProcessRequest)1 ProcessResponse (com.walmartlabs.concord.server.queueclient.message.ProcessResponse)1 Path (java.nio.file.Path)1