Subversion Repositories SmartDukaan

Rev

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

Rev 36999 Rev 37651
Line 35... Line 35...
35
        executor.setThreadNamePrefix("mail-outbox-");
35
        executor.setThreadNamePrefix("mail-outbox-");
36
        executor.initialize();
36
        executor.initialize();
37
        return executor;
37
        return executor;
38
    }
38
    }
39
 
39
 
-
 
40
    /**
-
 
41
     * Fetches LMS call recordings from the telephony provider into our object store. Single-threaded
-
 
42
     * on purpose: these are multi-MB downloads and the point is to drain them steadily in the
-
 
43
     * background, not to saturate the link the moment a busy hour ends.
-
 
44
     */
-
 
45
    @Bean(name = "recordingArchiveExecutor")
-
 
46
    public Executor recordingArchiveExecutor() {
-
 
47
        ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
-
 
48
        executor.setCorePoolSize(1);
-
 
49
        executor.setMaxPoolSize(2);
-
 
50
        executor.setQueueCapacity(500);
-
 
51
        executor.setThreadNamePrefix("recording-archive-");
-
 
52
        executor.initialize();
-
 
53
        return executor;
-
 
54
    }
-
 
55
 
40
    @Bean(name = "priceHikeExecutor")
56
    @Bean(name = "priceHikeExecutor")
41
    public Executor priceHikeExecutor() {
57
    public Executor priceHikeExecutor() {
42
        ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
58
        ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
43
        executor.setCorePoolSize(1);
59
        executor.setCorePoolSize(1);
44
        executor.setMaxPoolSize(3);
60
        executor.setMaxPoolSize(3);