Project

General

Profile

« Previous | Next » 

Revision 54940

force validator workers to 1

View differences:

modules/dnet-validator-workflows/trunk/src/main/java/eu/dnetlib/msro/workflows/nodes/validation/ValidatorServiceBlackboardJobNode.java
1 1
package eu.dnetlib.msro.workflows.nodes.validation;
2 2

  
3 3
import javax.annotation.Resource;
4
import javax.xml.bind.annotation.XmlType;
4 5

  
5 6
import eu.dnetlib.enabling.datasources.common.Api;
6 7
import eu.dnetlib.enabling.datasources.common.Datasource;
......
41 42

  
42 43
	public static final Log log = LogFactory.getLog(ValidatorServiceBlackboardJobNode.class); // NOPMD by marko on 11/24/08 5:02 PM
43 44

  
45
	private static final int DEAFULT_WORKERS = 1;
46

  
44 47
	public static final String VALIDATE_ACTION = "VALIDATE";
45 48
	public static final String VALIDATION_TYPE = "DNET";
46 49

  
......
62 65
	/** True to ask the validator to update the blacklist. **/
63 66
	private boolean shouldUpdateBlacklist = true;
64 67

  
68
	private int workers = DEAFULT_WORKERS;
69

  
65 70
	@Resource
66 71
	private UniqueServiceLocator serviceLocator;
67 72

  
......
127 132
		job.getParameters().put("interfaceId", api);
128 133
		job.getParameters().put("baseUrl", token.getFullEnv().getAttribute(WorkflowsConstants.DATAPROVIDER_INTERFACE_BASEURL));
129 134
		job.getParameters().put("mdstoreId", mdstoreId);
135
		job.getParameters().put("workers", String.valueOf(getWorkers()));
130 136

  
131 137
		// output params
132 138
		job.getParameters().put("outputEpr", isShouldOutputRecords() + "");
......
221 227
					dsManager.setLastValidationJob(dsId, ifaceId, jobId);
222 228
				} catch (final Throwable e) {
223 229
					final String msg = String.format("Error setting last_validation_job field, BB jobId '%s'", job.getId());
224
					log.error(msg);
230
					log.error(msg, e);
225 231
					job.setError(msg);
226 232
					super.onFailed(job);
227 233
					throw new MSRORuntimeException(msg, e);
......
379 385
		this.blacklistRuleName = blacklistRuleName;
380 386
	}
381 387

  
388
	public int getWorkers() {
389
		return workers;
390
	}
391

  
392
	public void setWorkers(int workers) {
393
		this.workers = workers;
394
	}
382 395
}

Also available in: Unified diff