Project

General

Profile

« Previous | Next » 

Revision 29592

fixed a bug in action status update

View differences:

modules/uoa-search/trunk/src/main/java/eu/dnetlib/data/search/app/SearchServiceBlackboardHandler.java
43 43
        String action = job.getAction();
44 44

  
45 45
        try {
46
            job.setActionStatus(ActionStatus.ASSIGNED);
46
			getBlackboardHandler().ongoing(job);
47 47

  
48 48
            if (action.equals("UpdateIndex")) {
49 49
                String indexProfileId = job.getParameters().get("IndexId");
50
                logger.debug("Updating the service to use index " + indexProfileId);
50
                logger.info("Updating the service to use index " + indexProfileId);
51 51

  
52 52
                String indexProfile = lookUpServiceServiceLocator.getService().getResourceProfile(indexProfileId);
53 53
                String mdFormat = getMDFormat(indexProfile);
54 54
                String indexLayout = getIndexLayout(indexProfile);
55
                logger.debug("New mdFormat: " + mdFormat + ", new layout: " + indexLayout);
55
                logger.info("New mdFormat: " + mdFormat + ", new layout: " + indexLayout);
56 56

  
57 57
                searchService.setMdFormat(mdFormat);
58 58
                searchService.setIndexLayout(indexLayout);
......
60 60
                throw new Exception("Don't know what to do with " + action);
61 61
            }
62 62

  
63
            job.setActionStatus(ActionStatus.DONE);
63
			getBlackboardHandler().done(job);
64 64
        } catch (Exception e) {
65
            job.setActionStatus(ActionStatus.FAILED);
66
            job.setError("Don't know what to do with " + action);
65
			getBlackboardHandler().failed(job, e);
67 66

  
68 67
            logger.error("Error processing job", e);
69 68
        }
......
106 105
    public void setSearchService(SearchServiceImpl searchService) {
107 106
        this.searchService = searchService;
108 107
    }
109
}
108
}

Also available in: Unified diff