Project

General

Profile

« Previous | Next » 

Revision 59415

making the mdstore feed action aware of the workflow process registry to handle workflow kills

View differences:

FeedAction.java
2 2

  
3 3
import java.util.List;
4 4

  
5
import com.googlecode.sarasvati.GraphProcess;
5 6
import eu.dnetlib.data.mdstore.MDStoreServiceException;
6 7
import eu.dnetlib.data.mdstore.modular.MDFormatDescription;
7 8
import eu.dnetlib.data.mdstore.modular.MDStoreFeeder;
8 9
import eu.dnetlib.data.mdstore.modular.MDStoreUtils;
9 10
import eu.dnetlib.enabling.tools.blackboard.BlackboardJob;
10 11
import eu.dnetlib.enabling.tools.blackboard.BlackboardServerHandler;
12
import eu.dnetlib.msro.workflows.util.WorkflowsConstants;
11 13
import org.apache.commons.logging.Log;
12 14
import org.apache.commons.logging.LogFactory;
13 15
import org.springframework.beans.factory.annotation.Autowired;
......
47 49
            }
48 50
        }
49 51

  
52
        final String processId = job.getParameters().get(WorkflowsConstants.SYSTEM_WF_PROCESS_ID);
53
		final GraphProcess proc = getGraphProcessRegistry().findProcess(processId);
50 54

  
51
        feeder.feed(mdId, epr, storingType, true, mdformats, params -> {
55
		log.info(String.format("feeding mdstore %s from workflow process %s", mdId, processId));
56

  
57
        feeder.feed(mdId, epr, storingType, true, mdformats, proc, params -> {
52 58
	        job.getParameters().put("mdstoreSize", "" + params.get("mdstoreSize"));
53 59
	        job.getParameters().put("writeOps", "" + params.get("writeOps"));
54 60
	        completeWithSuccess(handler, job);

Also available in: Unified diff