Package hudson.plugins.gearman
Class ExecutorWorkerThread
java.lang.Object
hudson.plugins.gearman.AbstractWorkerThread
hudson.plugins.gearman.ExecutorWorkerThread
- All Implemented Interfaces:
Runnable
-
Field Summary
Fields inherited from class hudson.plugins.gearman.AbstractWorkerThread
availability, conn, host, name, port, worker
-
Constructor Summary
ConstructorsConstructorDescriptionExecutorWorkerThread
(String host, int port, String name, Computer computer, String builtInName, AvailabilityMonitor availability) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
void
Register gearman functions on this computer.Methods inherited from class hudson.plugins.gearman.AbstractWorkerThread
getAvailability, getHost, getName, getPort, isAlive, run, setAvailability, setHost, setName, setPort, start, stop, testInitWorker, updateJobs
-
Constructor Details
-
ExecutorWorkerThread
public ExecutorWorkerThread(String host, int port, String name, Computer computer, String builtInName, AvailabilityMonitor availability)
-
-
Method Details
-
initWorker
protected void initWorker()- Overrides:
initWorker
in classAbstractWorkerThread
-
registerJobs
public void registerJobs()Register gearman functions on this computer. This will unregister all functions before registering new functions. Works for free-style and maven projects but does not work for multi-config projects How functions are registered: - If the project has no label then we register the project with all computers build:pep8 on precise-123 build:pep8 on oneiric-456 - If the project contains one label then we register with the computer that contains the corresponding label. Labels with '&&' is considered just one label build:pep8:precise on precise-123 build:pep8 on precise-123 build:pep8:precise on precise-129 build:pep8 on precise-129 - If the project contains multiple labels separated by '||' then we register with the computers that contain the corresponding labels build:pep8:precise on precise-123 build:pep8 on precise-123 build:pep8:precise on precise-129 build:pep8 on precise-129 build:pep8:oneiric on oneiric-456 build:pep8 on oneiric-456 build:pep8:oneiric on oneiric-459 build:pep8 on oneiric-459- Overrides:
registerJobs
in classAbstractWorkerThread
-
getComputer
-