Project

General

Profile

« Previous | Next » 

Revision 49069

Trying to get some counters in the wf history logs.

View differences:

modules/dnet-parthenos/trunk/src/main/java/eu/dnetlib/parthenos/workflows/nodes/PublishVirtuosoJobNode.java
10 10
import eu.dnetlib.msro.workflows.graph.Arc;
11 11
import eu.dnetlib.msro.workflows.nodes.SimpleJobNode;
12 12
import eu.dnetlib.msro.workflows.procs.Env;
13
import eu.dnetlib.msro.workflows.util.WorkflowsConstants;
13 14
import eu.dnetlib.rmi.common.ResultSet;
14 15
import eu.dnetlib.rmi.manager.MSROException;
15 16
import org.apache.commons.logging.Log;
......
44 45
		int countAll = 0;
45 46
		int countOk = 0;
46 47
		Map<Integer,Integer> errors = Maps.newHashMap();
47
		log.info("Pulisher endpoint: "+getPublisherEndpoint());
48
		log.info("Publisher endpoint: "+getPublisherEndpoint());
48 49

  
49
		//let's start sequencially
50
		//let's start sequentially
50 51
		for(String record : getResultSetClient().iter(rsIn, String.class)){
51 52

  
52 53
			HttpPost post = new HttpPost(getPublisherEndpoint());
......
66 67
			}
67 68

  
68 69
		}
69
		env.setAttribute("log:countOk", countOk);
70
		env.setAttribute("log:countAll", countAll);
71
		env.setAttribute("log:errorsMap", new Gson().toJson(errors));
70
		env.setAttribute(WorkflowsConstants.MAIN_LOG_PREFIX+"countOk", countOk);
71
		env.setAttribute(WorkflowsConstants.MAIN_LOG_PREFIX+"countAll", countAll);
72
		env.setAttribute(WorkflowsConstants.MAIN_LOG_PREFIX+"errorsMap", new Gson().toJson(errors));
72 73

  
74
		log.debug("countOK: "+countOk);
75

  
73 76
		return Arc.DEFAULT_ARC;
74 77

  
75 78
	}

Also available in: Unified diff