|
|
|
|
@ -91,22 +91,26 @@ var plugin = function (args) {
|
|
|
|
|
args.jobLog("Required Tags: ".concat(requiredTags.join(',')));
|
|
|
|
|
args.jobLog("Current Tags: ".concat(currentTags.join(',')));
|
|
|
|
|
var isSubset = true;
|
|
|
|
|
for (var i = 0; i < currentTags.length; i += 1) {
|
|
|
|
|
if (!requiredTags.includes(currentTags[i])) {
|
|
|
|
|
for (var i = 0; i < requiredTags.length; i += 1) {
|
|
|
|
|
if (!currentTags.includes(requiredTags[i])) {
|
|
|
|
|
isSubset = false;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
// requiredTags needs to be subset of currentTags
|
|
|
|
|
args.jobLog("Current tags: ".concat(currentTags));
|
|
|
|
|
args.jobLog("Required tags: ".concat(requiredTags));
|
|
|
|
|
args.jobLog("Is Subset: ".concat(isSubset));
|
|
|
|
|
if (isSubset) {
|
|
|
|
|
// eslint-disable-next-line no-param-reassign
|
|
|
|
|
args.variables.queueTags = '';
|
|
|
|
|
args.jobLog('Worker type and tags are subset of required tags');
|
|
|
|
|
args.jobLog('Required tags are subset of current tags, continuing to next plugin.');
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
args.jobLog('Required tags are not subset of current tags, requeueing.');
|
|
|
|
|
// eslint-disable-next-line no-param-reassign
|
|
|
|
|
args.variables.queueTags = requiredTags.join(',');
|
|
|
|
|
args.jobLog('Worker type and tags are not subset of required tags,'
|
|
|
|
|
+ " requeueing with tags ".concat(args.variables.queueTags));
|
|
|
|
|
args.jobLog("Requeueing with tags ".concat(args.variables.queueTags));
|
|
|
|
|
}
|
|
|
|
|
return {
|
|
|
|
|
outputFileObj: args.inputFileObj,
|
|
|
|
|
|