package com.github.microservice.core.components.queue.config;

import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;

@Configuration
@ComponentScan("com.github.microservice.core.components.queue.service")
public class ExecQueueConfig {


    /**
     * 队列执行的延迟时间
     */
    public long sleepTime(int tryIndex) {
        return 3 * 1000L * tryIndex;
    }

    /**
     * work状态的执行超时时间
     */
    public long executeTimeOut() {
        return 1000L * 60;
    }

    // loop_event的间隔时间
    public long loopEventTime() {
        return 1000L;
    }

    /**
     * 最大的批量执行执行数
     */
    public int maxBatchExecuteCount() {
        return 10;
    }


}
