Subversion Repositories SmartDukaan

Rev

Rev 10922 | Rev 11197 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 10922 Rev 10925
Line 316... Line 316...
316
		process.waitFor();
316
		process.waitFor();
317
		logger.info(String.valueOf(process.exitValue()));
317
		logger.info(String.valueOf(process.exitValue()));
318
		return "asinjob";
318
		return "asinjob";
319
 
319
 
320
	}
320
	}
-
 
321
	
-
 
322
	public String runFbbListingJob() throws IOException, InterruptedException {
-
 
323
        if(!ReportsUtils.canAccessReport((Long)session.getAttribute(ReportsUtils.ROLE), request.getRequestURI().substring(request.getContextPath().length()).split("/")[1].split("!")[0])) {
-
 
324
            logger.info(request.getRequestURI().substring(request.getContextPath().length()).split("/")[1].split("!")[0]);
-
 
325
            return "authfail";
-
 
326
        }
-
 
327
        ProcessBuilder testProcess = new ProcessBuilder("/bin/bash");
-
 
328
        String[] command = {"/bin/bash", "-c", "sudo /root/code/trunk/AmazonFeeds/RunFbbListingJob.sh"};
-
 
329
        testProcess.command(command);
-
 
330
        logger.info(testProcess.command().toString());
-
 
331
        Process process = testProcess.start();
-
 
332
        process.waitFor();
-
 
333
        logger.info(String.valueOf(process.exitValue()));
-
 
334
        return "asinjob";
-
 
335
    }
-
 
336
	
321
 
337
 
322
	public String runFbaListingJob() throws IOException, InterruptedException {
338
	public String runFbaListingJob() throws IOException, InterruptedException {
323
		if(!ReportsUtils.canAccessReport((Long)session.getAttribute(ReportsUtils.ROLE), request.getRequestURI().substring(request.getContextPath().length()).split("/")[1].split("!")[0])) {
339
		if(!ReportsUtils.canAccessReport((Long)session.getAttribute(ReportsUtils.ROLE), request.getRequestURI().substring(request.getContextPath().length()).split("/")[1].split("!")[0])) {
324
			logger.info(request.getRequestURI().substring(request.getContextPath().length()).split("/")[1].split("!")[0]);
340
			logger.info(request.getRequestURI().substring(request.getContextPath().length()).split("/")[1].split("!")[0]);
325
			return "authfail";
341
			return "authfail";