Subversion Repositories SmartDukaan

Rev

Rev 30403 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 30403 Rev 34153
Line 1... Line 1...
1
package com.smartdukaan.cron.config;
1
package com.smartdukaan.cron.config;
2
 
2
 
3
import org.apache.logging.log4j.LogManager;
3
import org.apache.logging.log4j.LogManager;
4
import org.apache.logging.log4j.Logger;
4
import org.apache.logging.log4j.Logger;
5
import org.springframework.context.annotation.Configuration;
5
import org.springframework.context.annotation.Configuration;
-
 
6
import org.springframework.context.annotation.Profile;
-
 
7
import org.springframework.scheduling.annotation.EnableScheduling;
6
import org.springframework.scheduling.annotation.SchedulingConfigurer;
8
import org.springframework.scheduling.annotation.SchedulingConfigurer;
7
import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler;
9
import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler;
8
import org.springframework.scheduling.config.ScheduledTaskRegistrar;
10
import org.springframework.scheduling.config.ScheduledTaskRegistrar;
9
 
11
 
10
@Configuration
12
@Configuration
-
 
13
@EnableScheduling
-
 
14
@Profile("scheduled")
11
public class SchedulerConfig implements SchedulingConfigurer {
15
public class SchedulerConfig implements SchedulingConfigurer {
12
	/**
16
	/**
13
	 * The pool size.
17
	 * The pool size.
14
	 */
18
	 */
15
	private final int POOL_SIZE = 10;
19
	private final int POOL_SIZE = 10;
16
 
20
 
17
	/**
21
	/**"prod"
18
	 * Configures the scheduler to allow multiple pools.
22
	 * Configures the scheduler to allow multiple pools.
19
	 *
23
	 *
20
	 * @param taskRegistrar The task registrar.
24
	 * @param taskRegistrar The task registrar.
21
	 */
25
	 */
22
	private static final Logger LOGGER = LogManager.getLogger(SchedulerConfig.class);
26
	private static final Logger LOGGER = LogManager.getLogger(SchedulerConfig.class);