Search in sources :

Example 1 with WorkerJobParams

use of com.facebook.buck.shell.WorkerJobParams in project buck by facebook.

the class JsUtil method workerShellStep.

static WorkerShellStep workerShellStep(WorkerTool worker, String jobArgs, BuildTarget buildTarget, SourcePathResolver sourcePathResolver, ProjectFilesystem projectFilesystem) {
    final Tool tool = worker.getTool();
    final WorkerJobParams params = WorkerJobParams.of(worker.getTempDir(), tool.getCommandPrefix(sourcePathResolver), worker.getArgs(sourcePathResolver), tool.getEnvironment(sourcePathResolver), jobArgs, worker.getMaxWorkers(), worker.isPersistent() ? Optional.of(buildTarget.getCellPath().toString() + buildTarget.toString()) : Optional.empty(), Optional.of(worker.getInstanceKey()));
    return new WorkerShellStep(Optional.of(params), Optional.empty(), Optional.empty(), new WorkerProcessPoolFactory(projectFilesystem));
}
Also used : WorkerJobParams(com.facebook.buck.shell.WorkerJobParams) WorkerProcessPoolFactory(com.facebook.buck.shell.WorkerProcessPoolFactory) WorkerShellStep(com.facebook.buck.shell.WorkerShellStep) Tool(com.facebook.buck.rules.Tool) WorkerTool(com.facebook.buck.shell.WorkerTool)

Aggregations

Tool (com.facebook.buck.rules.Tool)1 WorkerJobParams (com.facebook.buck.shell.WorkerJobParams)1 WorkerProcessPoolFactory (com.facebook.buck.shell.WorkerProcessPoolFactory)1 WorkerShellStep (com.facebook.buck.shell.WorkerShellStep)1 WorkerTool (com.facebook.buck.shell.WorkerTool)1