|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
"use strict"; |
|
|
|
|
|
var masterNetRunnerConfig; |
|
|
|
function setConfig(config) { |
|
if (config === undefined) |
|
return 'masterNetRunner config undefined'; |
|
|
|
if (config.wsSend === undefined) |
|
return 'masterNetRunner wsSend undefined'; |
|
|
|
var k = Object.keys(config.runners); |
|
if (k === 0) { |
|
return 'masterNetRunner no runners'; |
|
} |
|
|
|
masterNetRunnerConfig = config; |
|
return undefined; |
|
} |
|
|
|
function runnerRunJob(runnerId, job) { |
|
masterNetRunnerConfig.wsSend( |
|
runnerId, |
|
'runnerRunJob', |
|
job); |
|
} |
|
|
|
function runnerSyncProject(runnerId, repository) { |
|
masterNetRunnerConfig.wsSend( |
|
runnerId, |
|
'runnerSyncProject', |
|
repository); |
|
} |
|
|
|
module.exports.setConfig = setConfig; |
|
module.exports.runnerRunJob = runnerRunJob; |
|
module.exports.runnerSyncProject = runnerSyncProject; |
|
|