Subversion Repositories SmartDukaan

Rev

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

Rev 23511 Rev 23530
Line 37... Line 37...
37
	@Autowired
37
	@Autowired
38
	SchemeService schemeService;
38
	SchemeService schemeService;
39
 
39
 
40
	@Autowired
40
	@Autowired
41
	FofoOrderRepository fofoOrderRepository;
41
	FofoOrderRepository fofoOrderRepository;
-
 
42
	
-
 
43
	@Autowired
-
 
44
	private RestClient restClient;
42
 
45
 
43
	@Autowired
46
	@Autowired
44
	private MVCResponseSender mvcResponseSender;
47
	private MVCResponseSender mvcResponseSender;
45
	
48
	
46
	@Value("${prod}")
49
	@Value("${prod}")
Line 50... Line 53...
50
	private static final Logger LOGGER = LoggerFactory.getLogger(CronController.class);
53
	private static final Logger LOGGER = LoggerFactory.getLogger(CronController.class);
51
 
54
 
52
	@Scheduled(cron = "0 45 6 * * *")
55
	@Scheduled(cron = "0 45 6 * * *")
53
	public void executeJob() throws Exception {
56
	public void executeJob() throws Exception {
54
		if(prod) {
57
		if(prod) {
55
			RestClient rc = new RestClient(SchemeType.HTTP, "localhost", 8080);
-
 
56
			String uri = "/cron/process-schemes";
58
			String uri = "/cron/process-schemes";
57
			rc.get(uri, null);
59
			restClient.get(SchemeType.HTTP, "localhost", 8080, uri, null);
58
		}
60
		}
59
	}
61
	}
60
	
62
	
61
	@RequestMapping(value = "/cron/process-schemes", method = RequestMethod.GET)
63
	@RequestMapping(value = "/cron/process-schemes", method = RequestMethod.GET)
62
	public String createScheme(HttpServletRequest request, Model model) throws Exception{
64
	public String createScheme(HttpServletRequest request, Model model) throws Exception{