package com.friday.distributor.constant;

public class Events {
    public enum TaskEvent {
        START_TASK("启动任务"),
        UPDATE_TASK("更新任务"),
        FINISH_TASK("结束任务");

        private String description;

        TaskEvent(String description){
            this.description = description;
        }

        public String getDescription(){
            return this.description;
        }
    }

    public enum JobEvent {
        START_JOB("启动子任务"),
        UPDATE_JOB("更新子任务"),
        RETRY_JOB("重试子任务"),
        COMPLETE_JOB("完成子任务"),
        FAIL_JOB("子任务执行失败"),
        TERMINATE_JOB("中止子任务"),
        START_TIMEOUT_JOB("启动超时中止子任务"),
        RUNNING_TIMEOUT_JOB("运行超时中止子任务");

        private String description;

        JobEvent(String description){
            this.description = description;
        }

        public String getDescription(){
            return this.description;
        }
    }
}

