build: continew-starter 2.9.0 => 2.10.0

1.适配限流模块、链路追踪模块、访问日志等配置调整
2.适配Crud模块 API 命名变化(add => create、detail => get)
3.适配 sa-token、snail-job 升级变化
This commit is contained in:
2025-03-26 22:58:21 +08:00
parent 754ef0639b
commit cae6da298c
62 changed files with 469 additions and 433 deletions

View File

@@ -14,7 +14,7 @@
<properties>
<!-- SnailJob 服务端 -->
<snail-job.version>1.2.0</snail-job.version>
<snail-job.version>1.4.0</snail-job.version>
</properties>
<dependencies>

View File

@@ -3,12 +3,12 @@ server:
--- ### 数据源配置
spring.datasource:
url: jdbc:mysql://${DB_HOST:127.0.0.1}:${DB_PORT:3306}/${DB_NAME:continew_admin_job}?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&useSSL=false&allowMultiQueries=true&rewriteBatchedStatements=true&autoReconnect=true&maxReconnects=10&failOverReadOnly=false
url: jdbc:mysql://${DB_HOST:127.0.0.1}:${DB_PORT:3306}/${DB_NAME:continew_admin_job}?serverTimezone=Asia/Shanghai&useSSL=true&useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true&autoReconnect=true&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true
username: ${DB_USER:root}
password: ${DB_PWD:123456}
driver-class-name: com.mysql.cj.jdbc.Driver
# # PostgreSQL 配置
# url: jdbc:postgresql://${DB_HOST:127.0.0.1}:${DB_PORT:3306}/${DB_NAME:continew_admin_job}?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&useSSL=false&allowMultiQueries=true&rewriteBatchedStatements=true&autoReconnect=true&maxReconnects=10&failOverReadOnly=false
# url: jdbc:postgresql://${DB_HOST:127.0.0.1}:${DB_PORT:5432}/${DB_NAME:continew_admin_job}?serverTimezone=Asia/Shanghai&useSSL=true&useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true&autoReconnect=true&stringtype=unspecified
# username: ${DB_USER:root}
# password: ${DB_PWD:123456}
# driver-class-name: org.postgresql.Driver

View File

@@ -3,12 +3,12 @@ server:
--- ### 数据源配置
spring.datasource:
url: jdbc:mysql://${DB_HOST:127.0.0.1}:${DB_PORT:3306}/${DB_NAME:continew_admin_job}?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&useSSL=false&allowMultiQueries=true&rewriteBatchedStatements=true&autoReconnect=true&maxReconnects=10&failOverReadOnly=false
url: jdbc:mysql://${DB_HOST:127.0.0.1}:${DB_PORT:3306}/${DB_NAME:continew_admin_job}?serverTimezone=Asia/Shanghai&useSSL=true&useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true&autoReconnect=true&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true
username: ${DB_USER:root}
password: ${DB_PWD:123456}
driver-class-name: com.mysql.cj.jdbc.Driver
# # PostgreSQL 配置
# url: jdbc:postgresql://${DB_HOST:127.0.0.1}:${DB_PORT:3306}/${DB_NAME:continew_admin_job}?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&useSSL=false&allowMultiQueries=true&rewriteBatchedStatements=true&autoReconnect=true&maxReconnects=10&failOverReadOnly=false
# url: jdbc:postgresql://${DB_HOST:127.0.0.1}:${DB_PORT:5432}/${DB_NAME:continew_admin_job}?serverTimezone=Asia/Shanghai&useSSL=true&useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true&autoReconnect=true&stringtype=unspecified
# username: ${DB_USER:root}
# password: ${DB_PWD:123456}
# driver-class-name: org.postgresql.Driver

View File

@@ -5,10 +5,10 @@
INSERT INTO `sj_namespace` (`id`, `name`, `unique_id`, `create_dt`, `update_dt`, `deleted`)
VALUES (1, 'Default', '764d604ec6fc45f68cd92514c40e9e1a', NOW(), NOW(), 0);
-- 默认分组continew-admin
INSERT INTO `sj_group_config` (`id`, `namespace_id`, `group_name`, `description`, `token`, `group_status`, `version`, `group_partition`, `id_generator_mode`, `init_scene`, `bucket_index`, `create_dt`, `update_dt`)
VALUES (1, '764d604ec6fc45f68cd92514c40e9e1a', 'continew-admin', '默认分组', 'SJ_Wyz3dmsdbDOkDujOTSSoBjGQP1BMsVnj', 1, 1, 0, 2, 1, 119, NOW(), NOW());
-- 默认用户admin/admin
INSERT INTO `sj_system_user` (username, password, role)
VALUES ('admin', '465c194afb65670f38322df087f0a9bb225cc257e43eb4ac5a0c98ef5b3173ac', 2);
-- 默认分组continew-admin
INSERT INTO `sj_group_config` (`id`, `namespace_id`, `group_name`, `description`, `token`, `group_status`, `version`, `group_partition`, `id_generator_mode`, `init_scene`, `create_dt`, `update_dt`)
VALUES (1, '764d604ec6fc45f68cd92514c40e9e1a', 'continew-admin', '默认分组', 'SJ_Wyz3dmsdbDOkDujOTSSoBjGQP1BMsVnj', 1, 1, 0, 2, 1, NOW(), NOW());

View File

@@ -30,7 +30,6 @@ CREATE TABLE `sj_group_config`
`group_partition` int(11) NOT NULL COMMENT '分区',
`id_generator_mode` tinyint(4) NOT NULL DEFAULT 1 COMMENT '唯一id生成模式 默认号段模式',
`init_scene` tinyint(4) NOT NULL DEFAULT 0 COMMENT '是否初始化场景 0:否 1:是',
`bucket_index` int(11) NOT NULL DEFAULT 0 COMMENT 'bucket',
`create_dt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_dt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
PRIMARY KEY (`id`),
@@ -45,7 +44,7 @@ CREATE TABLE `sj_notify_config`
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
`namespace_id` varchar(64) NOT NULL DEFAULT '764d604ec6fc45f68cd92514c40e9e1a' COMMENT '命名空间id',
`group_name` varchar(64) NOT NULL COMMENT '组名称',
`business_id` varchar(64) NOT NULL COMMENT '业务id (job_id或workflow_id或scene_name)',
`notify_name` varchar(64) NOT NULL DEFAULT '' COMMENT '通知名称',
`system_task_type` tinyint(4) NOT NULL DEFAULT 3 COMMENT '任务类型 1. 重试任务 2. 重试回调 3、JOB任务 4、WORKFLOW任务',
`notify_status` tinyint(4) NOT NULL DEFAULT 0 COMMENT '通知状态 0、未启用 1、启用',
`recipient_ids` varchar(128) NOT NULL COMMENT '接收人id列表',
@@ -57,7 +56,7 @@ CREATE TABLE `sj_notify_config`
`create_dt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_dt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
PRIMARY KEY (`id`),
KEY `idx_namespace_id_group_name_scene_name` (`namespace_id`, `group_name`, `business_id`)
KEY `idx_namespace_id_group_name_scene_name` (`namespace_id`, `group_name`)
) ENGINE = InnoDB
AUTO_INCREMENT = 0
DEFAULT CHARSET = utf8mb4 COMMENT ='通知配置'
@@ -80,12 +79,10 @@ CREATE TABLE `sj_notify_recipient`
DEFAULT CHARSET = utf8mb4 COMMENT ='告警通知接收人'
;
CREATE TABLE `sj_retry_dead_letter_0`
CREATE TABLE `sj_retry_dead_letter`
(
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
`namespace_id` varchar(64) NOT NULL DEFAULT '764d604ec6fc45f68cd92514c40e9e1a' COMMENT '命名空间id',
`unique_id` varchar(64) NOT NULL COMMENT '同组下id唯一',
`group_name` varchar(64) NOT NULL COMMENT '组名称',
`scene_name` varchar(64) NOT NULL COMMENT '场景名称',
`idempotent_id` varchar(64) NOT NULL COMMENT '幂等id',
@@ -93,24 +90,21 @@ CREATE TABLE `sj_retry_dead_letter_0`
`executor_name` varchar(512) NOT NULL DEFAULT '' COMMENT '执行器名称',
`args_str` text NOT NULL COMMENT '执行方法参数',
`ext_attrs` text NOT NULL COMMENT '扩展字段',
`task_type` tinyint(4) NOT NULL DEFAULT 1 COMMENT '任务类型 1、重试数据 2、回调数据',
`create_dt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
PRIMARY KEY (`id`),
KEY `idx_namespace_id_group_name_scene_name` (`namespace_id`, `group_name`, `scene_name`),
KEY `idx_idempotent_id` (`idempotent_id`),
KEY `idx_biz_no` (`biz_no`),
KEY `idx_create_dt` (`create_dt`),
UNIQUE KEY `uk_namespace_id_group_name_unique_id` (`namespace_id`, `group_name`, `unique_id`)
KEY `idx_create_dt` (`create_dt`)
) ENGINE = InnoDB
AUTO_INCREMENT = 0
DEFAULT CHARSET = utf8mb4 COMMENT ='死信队列表'
;
CREATE TABLE `sj_retry_task_0`
CREATE TABLE `sj_retry`
(
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
`namespace_id` varchar(64) NOT NULL DEFAULT '764d604ec6fc45f68cd92514c40e9e1a' COMMENT '命名空间id',
`unique_id` varchar(64) NOT NULL COMMENT '同组下id唯一',
`group_name` varchar(64) NOT NULL COMMENT '组名称',
`scene_name` varchar(64) NOT NULL COMMENT '场景名称',
`idempotent_id` varchar(64) NOT NULL COMMENT '幂等id',
@@ -118,65 +112,65 @@ CREATE TABLE `sj_retry_task_0`
`executor_name` varchar(512) NOT NULL DEFAULT '' COMMENT '执行器名称',
`args_str` text NOT NULL COMMENT '执行方法参数',
`ext_attrs` text NOT NULL COMMENT '扩展字段',
`next_trigger_at` datetime NOT NULL COMMENT '下次触发时间',
`next_trigger_at` bigint(13) NOT NULL COMMENT '下次触发时间',
`retry_count` int(11) NOT NULL DEFAULT 0 COMMENT '重试次数',
`retry_status` tinyint(4) NOT NULL DEFAULT 0 COMMENT '重试状态 0、重试中 1、成功 2、最大重试次数',
`task_type` tinyint(4) NOT NULL DEFAULT 1 COMMENT '任务类型 1、重试数据 2、回调数据',
`bucket_index` int(11) NOT NULL DEFAULT 0 COMMENT 'bucket',
`parent_id` bigint(20) NOT NULL DEFAULT 0 COMMENT '父节点id',
`deleted` bigint(20) NOT NULL DEFAULT 0 COMMENT '逻辑删除',
`create_dt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_dt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
PRIMARY KEY (`id`),
KEY `idx_namespace_id_group_name_scene_name` (`namespace_id`, `group_name`, `scene_name`),
KEY `idx_namespace_id_group_name_task_type` (`namespace_id`, `group_name`, `task_type`),
KEY `idx_namespace_id_group_name_retry_status` (`namespace_id`, `group_name`, `retry_status`),
KEY `idx_idempotent_id` (`idempotent_id`),
KEY `idx_biz_no` (`biz_no`),
KEY `idx_parent_id` (`parent_id`),
KEY `idx_create_dt` (`create_dt`),
UNIQUE KEY `uk_name_unique_id` (`namespace_id`, `group_name`, `unique_id`)
UNIQUE KEY `uk_name_task_type_idempotent_id_deleted` (`namespace_id`, `group_name`, `task_type`, `idempotent_id`, `deleted`)
) ENGINE = InnoDB
AUTO_INCREMENT = 0
DEFAULT CHARSET = utf8mb4 COMMENT ='任务'
DEFAULT CHARSET = utf8mb4 COMMENT ='重试信息'
;
CREATE TABLE `sj_retry_task_log`
CREATE TABLE `sj_retry_task`
(
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
`namespace_id` varchar(64) NOT NULL DEFAULT '764d604ec6fc45f68cd92514c40e9e1a' COMMENT '命名空间id',
`unique_id` varchar(64) NOT NULL COMMENT '同组下id唯一',
`group_name` varchar(64) NOT NULL COMMENT '名称',
`scene_name` varchar(64) NOT NULL COMMENT '场景名称',
`idempotent_id` varchar(64) NOT NULL COMMENT '幂等id',
`biz_no` varchar(64) NOT NULL DEFAULT '' COMMENT '业务编号',
`executor_name` varchar(512) NOT NULL DEFAULT '' COMMENT '执行器名称',
`args_str` text NOT NULL COMMENT '执行方法参数',
`ext_attrs` text NOT NULL COMMENT '扩展字段',
`retry_status` tinyint(4) NOT NULL DEFAULT 0 COMMENT '重试状态 0、重试中 1、成功 2、最大次数',
`task_type` tinyint(4) NOT NULL DEFAULT 1 COMMENT '任务类型 1、重试数据 2、回调数据',
`create_dt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_dt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
`namespace_id` varchar(64) NOT NULL DEFAULT '764d604ec6fc45f68cd92514c40e9e1a' COMMENT '命名空间id',
`group_name` varchar(64) NOT NULL COMMENT '组名称',
`scene_name` varchar(64) NOT NULL COMMENT '场景名称',
`retry_id` bigint(20) NOT NULL COMMENT '重试信息Id',
`ext_attrs` text NOT NULL COMMENT '扩展字段',
`task_status` tinyint(4) NOT NULL DEFAULT 1 COMMENT '重试状态',
`task_type` tinyint(4) NOT NULL DEFAULT 1 COMMENT '任务类型 1、重试数据 2、回调数据',
`operation_reason` tinyint(4) NOT NULL DEFAULT 0 COMMENT '操作原因',
`client_info` varchar(128) DEFAULT NULL COMMENT '客户端地址 clientId#ip:port',
`create_dt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_dt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
PRIMARY KEY (`id`),
KEY `idx_group_name_scene_name` (`namespace_id`, `group_name`, `scene_name`),
KEY `idx_retry_status` (`retry_status`),
KEY `idx_idempotent_id` (`idempotent_id`),
KEY `idx_unique_id` (`unique_id`),
KEY `idx_biz_no` (`biz_no`),
KEY `idx_create_dt` (`create_dt`)
KEY `task_status` (`task_status`),
KEY `idx_create_dt` (`create_dt`),
KEY `idx_retry_id` (`retry_id`)
) ENGINE = InnoDB
AUTO_INCREMENT = 0
DEFAULT CHARSET = utf8mb4 COMMENT ='任务日志基础信息'
DEFAULT CHARSET = utf8mb4 COMMENT ='重试任务表'
;
CREATE TABLE `sj_retry_task_log_message`
(
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
`namespace_id` varchar(64) NOT NULL DEFAULT '764d604ec6fc45f68cd92514c40e9e1a' COMMENT '命名空间id',
`group_name` varchar(64) NOT NULL COMMENT '组名称',
`unique_id` varchar(64) NOT NULL COMMENT '同组下id唯一',
`message` longtext NOT NULL COMMENT '异常信息',
`log_num` int(11) NOT NULL DEFAULT 1 COMMENT '日志数量',
`real_time` bigint(13) NOT NULL DEFAULT 0 COMMENT '上报时间',
`create_dt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
`namespace_id` varchar(64) NOT NULL DEFAULT '764d604ec6fc45f68cd92514c40e9e1a' COMMENT '命名空间id',
`group_name` varchar(64) NOT NULL COMMENT '组名称',
`retry_id` bigint(20) NOT NULL COMMENT '重试信息Id',
`retry_task_id` bigint(20) NOT NULL COMMENT '重试任务Id',
`message` longtext NOT NULL COMMENT '异常信息',
`log_num` int(11) NOT NULL DEFAULT 1 COMMENT '日志数量',
`real_time` bigint(13) NOT NULL DEFAULT 0 COMMENT '上报时间',
`create_dt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
PRIMARY KEY (`id`),
KEY `idx_namespace_id_group_name_scene_name` (`namespace_id`, `group_name`, `unique_id`),
KEY `idx_namespace_id_group_name_retry_task_id` (`namespace_id`, `group_name`, `retry_task_id`),
KEY `idx_create_dt` (`create_dt`)
) ENGINE = InnoDB
AUTO_INCREMENT = 0
@@ -185,20 +179,26 @@ CREATE TABLE `sj_retry_task_log_message`
CREATE TABLE `sj_retry_scene_config`
(
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
`namespace_id` varchar(64) NOT NULL DEFAULT '764d604ec6fc45f68cd92514c40e9e1a' COMMENT '命名空间id',
`scene_name` varchar(64) NOT NULL COMMENT '场景名称',
`group_name` varchar(64) NOT NULL COMMENT '组名称',
`scene_status` tinyint(4) NOT NULL DEFAULT 0 COMMENT '组状态 0、未启用 1、启用',
`max_retry_count` int(11) NOT NULL DEFAULT 5 COMMENT '最大重试次数',
`back_off` tinyint(4) NOT NULL DEFAULT 1 COMMENT '1、默认等级 2、固定间隔时间 3、CRON 表达式',
`trigger_interval` varchar(16) NOT NULL DEFAULT '' COMMENT '间隔时长',
`deadline_request` bigint(20) unsigned NOT NULL DEFAULT 60000 COMMENT 'Deadline Request 调用链超时 单位毫秒',
`executor_timeout` int(11) unsigned NOT NULL DEFAULT 5 COMMENT '任务执行超时时间,单位秒',
`route_key` tinyint(4) NOT NULL DEFAULT 4 COMMENT '路由策略',
`description` varchar(256) NOT NULL DEFAULT '' COMMENT '描述',
`create_dt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_dt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
`namespace_id` varchar(64) NOT NULL DEFAULT '764d604ec6fc45f68cd92514c40e9e1a' COMMENT '命名空间id',
`scene_name` varchar(64) NOT NULL COMMENT '场景名称',
`group_name` varchar(64) NOT NULL COMMENT '组名称',
`scene_status` tinyint(4) NOT NULL DEFAULT 0 COMMENT '组状态 0、未启用 1、启用',
`max_retry_count` int(11) NOT NULL DEFAULT 5 COMMENT '最大重试次数',
`back_off` tinyint(4) NOT NULL DEFAULT 1 COMMENT '1、默认等级 2、固定间隔时间 3、CRON 表达式',
`trigger_interval` varchar(16) NOT NULL DEFAULT '' COMMENT '间隔时长',
`notify_ids` varchar(128) NOT NULL DEFAULT '' COMMENT '通知告警场景配置id列表',
`deadline_request` bigint(20) unsigned NOT NULL DEFAULT 60000 COMMENT 'Deadline Request 调用链超时 单位',
`executor_timeout` int(11) unsigned NOT NULL DEFAULT 5 COMMENT '任务执行超时时间,单位秒',
`route_key` tinyint(4) NOT NULL DEFAULT 4 COMMENT '路由策略',
`block_strategy` tinyint(4) NOT NULL DEFAULT 1 COMMENT '阻塞策略 1、丢弃 2、覆盖 3、并行',
`cb_status` tinyint(4) NOT NULL DEFAULT 0 COMMENT '回调状态 0、不开启 1、开启',
`cb_trigger_type` tinyint(4) NOT NULL DEFAULT 1 COMMENT '1、默认等级 2、固定间隔时间 3、CRON 表达式',
`cb_max_count` int(11) NOT NULL DEFAULT 16 COMMENT '回调的最大执行次数',
`cb_trigger_interval` varchar(16) NOT NULL DEFAULT '' COMMENT '回调的最大执行次数',
`description` varchar(256) NOT NULL DEFAULT '' COMMENT '描述',
`create_dt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_dt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
PRIMARY KEY (`id`),
UNIQUE KEY `uk_namespace_id_group_name_scene_name` (`namespace_id`, `group_name`, `scene_name`)
) ENGINE = InnoDB
@@ -298,13 +298,15 @@ CREATE TABLE `sj_job`
`executor_info` varchar(255) DEFAULT NULL COMMENT '执行器名称',
`trigger_type` tinyint(4) NOT NULL COMMENT '触发类型 1.CRON 表达式 2. 固定时间',
`trigger_interval` varchar(255) NOT NULL COMMENT '间隔时长',
`block_strategy` tinyint(4) NOT NULL DEFAULT 1 COMMENT '阻塞策略 1、丢弃 2、覆盖 3、并行',
`block_strategy` tinyint(4) NOT NULL DEFAULT 1 COMMENT '阻塞策略 1、丢弃 2、覆盖 3、并行 4、恢复',
`executor_timeout` int(11) NOT NULL DEFAULT 0 COMMENT '任务执行超时时间,单位秒',
`max_retry_times` int(11) NOT NULL DEFAULT 0 COMMENT '最大重试次数',
`parallel_num` int(11) NOT NULL DEFAULT 1 COMMENT '并行数',
`retry_interval` int(11) NOT NULL DEFAULT 0 COMMENT '重试间隔(s)',
`bucket_index` int(11) NOT NULL DEFAULT 0 COMMENT 'bucket',
`resident` tinyint(4) NOT NULL DEFAULT 0 COMMENT '是否是常驻任务',
`notify_ids` varchar(128) NOT NULL DEFAULT '' COMMENT '通知告警场景配置id列表',
`owner_id` bigint(20) NULL COMMENT '负责人id',
`description` varchar(256) NOT NULL DEFAULT '' COMMENT '描述',
`ext_attrs` varchar(256) NULL DEFAULT '' COMMENT '扩展字段',
`deleted` tinyint(4) NOT NULL DEFAULT 0 COMMENT '逻辑删除 1、删除',
@@ -448,12 +450,13 @@ CREATE TABLE `sj_workflow`
`workflow_status` tinyint(4) NOT NULL DEFAULT 1 COMMENT '工作流状态 0、关闭、1、开启',
`trigger_type` tinyint(4) NOT NULL COMMENT '触发类型 1.CRON 表达式 2. 固定时间',
`trigger_interval` varchar(255) NOT NULL COMMENT '间隔时长',
`next_trigger_at` bigint(13) NOT NULL COMMENT '下次触发时间',
`next_trigger_at` bigint NOT NULL COMMENT '下次触发时间',
`block_strategy` tinyint(4) NOT NULL DEFAULT 1 COMMENT '阻塞策略 1、丢弃 2、覆盖 3、并行',
`executor_timeout` int(11) NOT NULL DEFAULT 0 COMMENT '任务执行超时时间,单位秒',
`description` varchar(256) NOT NULL DEFAULT '' COMMENT '描述',
`flow_info` text DEFAULT NULL COMMENT '流程信息',
`wf_context` text DEFAULT NULL COMMENT '上下文',
`notify_ids` varchar(128) NOT NULL DEFAULT '' COMMENT '通知告警场景配置id列表',
`bucket_index` int(11) NOT NULL DEFAULT 0 COMMENT 'bucket',
`version` int(11) NOT NULL COMMENT '版本号',
`ext_attrs` varchar(256) NULL DEFAULT '' COMMENT '扩展字段',

View File

@@ -5,10 +5,10 @@
INSERT INTO sj_namespace (id, name, unique_id, create_dt, update_dt, deleted)
VALUES (1, 'Default', '764d604ec6fc45f68cd92514c40e9e1a', NOW(), NOW(), 0);
-- 默认分组continew-admin
INSERT INTO sj_group_config (id, namespace_id, group_name, description, token, group_status, version, group_partition, id_generator_mode, init_scene, bucket_index, create_dt, update_dt)
VALUES (1, '764d604ec6fc45f68cd92514c40e9e1a', 'continew-admin', '默认分组', 'SJ_Wyz3dmsdbDOkDujOTSSoBjGQP1BMsVnj', 1, 1, 0, 2, 1, 119, NOW(), NOW());
-- 默认用户admin/admin
INSERT INTO sj_system_user (username, password, role)
VALUES ('admin', '465c194afb65670f38322df087f0a9bb225cc257e43eb4ac5a0c98ef5b3173ac', 2);
-- 默认分组continew-admin
INSERT INTO sj_group_config (id, namespace_id, group_name, description, token, group_status, version, group_partition, id_generator_mode, init_scene, create_dt, update_dt)
VALUES (1, '764d604ec6fc45f68cd92514c40e9e1a', 'continew-admin', '默认分组', 'SJ_Wyz3dmsdbDOkDujOTSSoBjGQP1BMsVnj', 1, 1, 0, 2, 1, NOW(), NOW());

View File

@@ -37,7 +37,6 @@ CREATE TABLE sj_group_config
group_partition int NOT NULL,
id_generator_mode smallint NOT NULL DEFAULT 1,
init_scene smallint NOT NULL DEFAULT 0,
bucket_index int NOT NULL DEFAULT 0,
create_dt timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
update_dt timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
);
@@ -54,7 +53,6 @@ COMMENT ON COLUMN sj_group_config.version IS '版本号';
COMMENT ON COLUMN sj_group_config.group_partition IS '分区';
COMMENT ON COLUMN sj_group_config.id_generator_mode IS '唯一id生成模式 默认号段模式';
COMMENT ON COLUMN sj_group_config.init_scene IS '是否初始化场景 0:否 1:是';
COMMENT ON COLUMN sj_group_config.bucket_index IS 'bucket';
COMMENT ON COLUMN sj_group_config.create_dt IS '创建时间';
COMMENT ON COLUMN sj_group_config.update_dt IS '修改时间';
COMMENT ON TABLE sj_group_config IS '组配置';
@@ -65,7 +63,7 @@ CREATE TABLE sj_notify_config
id bigserial PRIMARY KEY,
namespace_id varchar(64) NOT NULL DEFAULT '764d604ec6fc45f68cd92514c40e9e1a',
group_name varchar(64) NOT NULL,
business_id varchar(64) NOT NULL,
notify_name varchar(64) NOT NULL DEFAULT '',
system_task_type smallint NOT NULL DEFAULT 3,
notify_status smallint NOT NULL DEFAULT 0,
recipient_ids varchar(128) NOT NULL,
@@ -78,12 +76,12 @@ CREATE TABLE sj_notify_config
update_dt timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
);
CREATE INDEX idx_sj_notify_config_01 ON sj_notify_config (namespace_id, group_name, business_id);
CREATE INDEX idx_sj_notify_config_01 ON sj_notify_config (namespace_id, group_name);
COMMENT ON COLUMN sj_notify_config.id IS '主键';
COMMENT ON COLUMN sj_notify_config.namespace_id IS '命名空间id';
COMMENT ON COLUMN sj_notify_config.group_name IS '组名称';
COMMENT ON COLUMN sj_notify_config.business_id IS '业务id ( job_id或workflow_id或scene_name ) ';
COMMENT ON COLUMN sj_notify_config.notify_name IS '通知名称';
COMMENT ON COLUMN sj_notify_config.system_task_type IS '任务类型 1. 重试任务 2. 重试回调 3、JOB任务 4、WORKFLOW任务';
COMMENT ON COLUMN sj_notify_config.notify_status IS '通知状态 0、未启用 1、启用';
COMMENT ON COLUMN sj_notify_config.recipient_ids IS '接收人id列表';
@@ -121,12 +119,11 @@ COMMENT ON COLUMN sj_notify_recipient.create_dt IS '创建时间';
COMMENT ON COLUMN sj_notify_recipient.update_dt IS '修改时间';
COMMENT ON TABLE sj_notify_recipient IS '告警通知接收人';
-- sj_retry_dead_letter_0
CREATE TABLE sj_retry_dead_letter_0
-- sj_retry_dead_letter
CREATE TABLE sj_retry_dead_letter
(
id bigserial PRIMARY KEY,
namespace_id varchar(64) NOT NULL DEFAULT '764d604ec6fc45f68cd92514c40e9e1a',
unique_id varchar(64) NOT NULL,
group_name varchar(64) NOT NULL,
scene_name varchar(64) NOT NULL,
idempotent_id varchar(64) NOT NULL,
@@ -134,37 +131,31 @@ CREATE TABLE sj_retry_dead_letter_0
executor_name varchar(512) NOT NULL DEFAULT '',
args_str text NOT NULL,
ext_attrs text NOT NULL,
task_type smallint NOT NULL DEFAULT 1,
create_dt timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
);
CREATE UNIQUE INDEX uk_sj_retry_dead_letter_0_01 ON sj_retry_dead_letter_0 (namespace_id, group_name, unique_id);
CREATE INDEX idx_sj_retry_dead_letter_01 ON sj_retry_dead_letter (namespace_id, group_name, scene_name);
CREATE INDEX idx_sj_retry_dead_letter_02 ON sj_retry_dead_letter (idempotent_id);
CREATE INDEX idx_sj_retry_dead_letter_03 ON sj_retry_dead_letter (biz_no);
CREATE INDEX idx_sj_retry_dead_letter_04 ON sj_retry_dead_letter (create_dt);
CREATE INDEX idx_sj_retry_dead_letter_0_01 ON sj_retry_dead_letter_0 (namespace_id, group_name, scene_name);
CREATE INDEX idx_sj_retry_dead_letter_0_02 ON sj_retry_dead_letter_0 (idempotent_id);
CREATE INDEX idx_sj_retry_dead_letter_0_03 ON sj_retry_dead_letter_0 (biz_no);
CREATE INDEX idx_sj_retry_dead_letter_0_04 ON sj_retry_dead_letter_0 (create_dt);
COMMENT ON COLUMN sj_retry_dead_letter.id IS '主键';
COMMENT ON COLUMN sj_retry_dead_letter.namespace_id IS '命名空间id';
COMMENT ON COLUMN sj_retry_dead_letter.group_name IS '组名称';
COMMENT ON COLUMN sj_retry_dead_letter.scene_name IS '场景名称';
COMMENT ON COLUMN sj_retry_dead_letter.idempotent_id IS '幂等id';
COMMENT ON COLUMN sj_retry_dead_letter.biz_no IS '业务编号';
COMMENT ON COLUMN sj_retry_dead_letter.executor_name IS '执行器名称';
COMMENT ON COLUMN sj_retry_dead_letter.args_str IS '执行方法参数';
COMMENT ON COLUMN sj_retry_dead_letter.ext_attrs IS '扩展字段';
COMMENT ON COLUMN sj_retry_dead_letter.create_dt IS '创建时间';
COMMENT ON TABLE sj_retry_dead_letter IS '死信队列表';
COMMENT ON COLUMN sj_retry_dead_letter_0.id IS '主键';
COMMENT ON COLUMN sj_retry_dead_letter_0.namespace_id IS '命名空间id';
COMMENT ON COLUMN sj_retry_dead_letter_0.unique_id IS '同组下id唯一';
COMMENT ON COLUMN sj_retry_dead_letter_0.group_name IS '组名称';
COMMENT ON COLUMN sj_retry_dead_letter_0.scene_name IS '场景名称';
COMMENT ON COLUMN sj_retry_dead_letter_0.idempotent_id IS '幂等id';
COMMENT ON COLUMN sj_retry_dead_letter_0.biz_no IS '业务编号';
COMMENT ON COLUMN sj_retry_dead_letter_0.executor_name IS '执行器名称';
COMMENT ON COLUMN sj_retry_dead_letter_0.args_str IS '执行方法参数';
COMMENT ON COLUMN sj_retry_dead_letter_0.ext_attrs IS '扩展字段';
COMMENT ON COLUMN sj_retry_dead_letter_0.task_type IS '任务类型 1、重试数据 2、回调数据';
COMMENT ON COLUMN sj_retry_dead_letter_0.create_dt IS '创建时间';
COMMENT ON TABLE sj_retry_dead_letter_0 IS '死信队列表';
-- sj_retry_task_0
CREATE TABLE sj_retry_task_0
-- sj_retry
CREATE TABLE sj_retry
(
id bigserial PRIMARY KEY,
namespace_id varchar(64) NOT NULL DEFAULT '764d604ec6fc45f68cd92514c40e9e1a',
unique_id varchar(64) NOT NULL,
group_name varchar(64) NOT NULL,
scene_name varchar(64) NOT NULL,
idempotent_id varchar(64) NOT NULL,
@@ -172,103 +163,104 @@ CREATE TABLE sj_retry_task_0
executor_name varchar(512) NOT NULL DEFAULT '',
args_str text NOT NULL,
ext_attrs text NOT NULL,
next_trigger_at timestamp NOT NULL,
next_trigger_at bigint NOT NULL,
retry_count int NOT NULL DEFAULT 0,
retry_status smallint NOT NULL DEFAULT 0,
task_type smallint NOT NULL DEFAULT 1,
bucket_index int NOT NULL DEFAULT 0,
parent_id bigint NOT NULL DEFAULT 0,
deleted bigint NOT NULL DEFAULT 0,
create_dt timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
update_dt timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
);
CREATE UNIQUE INDEX uk_sj_retry_task_0_01 ON sj_retry_task_0 (namespace_id, group_name, unique_id);
CREATE UNIQUE INDEX uk_sj_retry_01 ON sj_retry (namespace_id, group_name, task_type, idempotent_id, deleted);
CREATE INDEX idx_sj_retry_task_0_01 ON sj_retry_task_0 (namespace_id, group_name, scene_name);
CREATE INDEX idx_sj_retry_task_0_02 ON sj_retry_task_0 (namespace_id, group_name, task_type);
CREATE INDEX idx_sj_retry_task_0_03 ON sj_retry_task_0 (namespace_id, group_name, retry_status);
CREATE INDEX idx_sj_retry_task_0_04 ON sj_retry_task_0 (idempotent_id);
CREATE INDEX idx_sj_retry_task_0_05 ON sj_retry_task_0 (biz_no);
CREATE INDEX idx_sj_retry_task_0_06 ON sj_retry_task_0 (create_dt);
CREATE INDEX idx_sj_retry_01 ON sj_retry (namespace_id, group_name, scene_name);
CREATE INDEX idx_sj_retry_02 ON sj_retry (namespace_id, group_name, retry_status);
CREATE INDEX idx_sj_retry_03 ON sj_retry (idempotent_id);
CREATE INDEX idx_sj_retry_04 ON sj_retry (biz_no);
CREATE INDEX idx_sj_retry_05 ON sj_retry (parent_id);
CREATE INDEX idx_sj_retry_06 ON sj_retry (create_dt);
COMMENT ON COLUMN sj_retry_task_0.id IS '主键';
COMMENT ON COLUMN sj_retry_task_0.namespace_id IS '命名空间id';
COMMENT ON COLUMN sj_retry_task_0.unique_id IS '同组下id唯一';
COMMENT ON COLUMN sj_retry_task_0.group_name IS '名称';
COMMENT ON COLUMN sj_retry_task_0.scene_name IS '场景名称';
COMMENT ON COLUMN sj_retry_task_0.idempotent_id IS '幂等id';
COMMENT ON COLUMN sj_retry_task_0.biz_no IS '业务编号';
COMMENT ON COLUMN sj_retry_task_0.executor_name IS '执行器名称';
COMMENT ON COLUMN sj_retry_task_0.args_str IS '执行方法参数';
COMMENT ON COLUMN sj_retry_task_0.ext_attrs IS '扩展字段';
COMMENT ON COLUMN sj_retry_task_0.next_trigger_at IS '下次触发时间';
COMMENT ON COLUMN sj_retry_task_0.retry_count IS '重试次数';
COMMENT ON COLUMN sj_retry_task_0.retry_status IS '重试状态 0、重试中 1、成功 2、最大重试次数';
COMMENT ON COLUMN sj_retry_task_0.task_type IS '任务类型 1、重试数据 2、回调数据';
COMMENT ON COLUMN sj_retry_task_0.create_dt IS '创建时间';
COMMENT ON COLUMN sj_retry_task_0.update_dt IS '修改时间';
COMMENT ON TABLE sj_retry_task_0 IS '任务表';
COMMENT ON COLUMN sj_retry.id IS '主键';
COMMENT ON COLUMN sj_retry.namespace_id IS '命名空间id';
COMMENT ON COLUMN sj_retry.group_name IS '组名称';
COMMENT ON COLUMN sj_retry.scene_name IS '场景名称';
COMMENT ON COLUMN sj_retry.idempotent_id IS '幂等id';
COMMENT ON COLUMN sj_retry.biz_no IS '业务编号';
COMMENT ON COLUMN sj_retry.executor_name IS '执行器名称';
COMMENT ON COLUMN sj_retry.args_str IS '执行方法参数';
COMMENT ON COLUMN sj_retry.ext_attrs IS '扩展字段';
COMMENT ON COLUMN sj_retry.next_trigger_at IS '下次触发时间';
COMMENT ON COLUMN sj_retry.retry_count IS '重试次数';
COMMENT ON COLUMN sj_retry.retry_status IS '重试状态 0、重试中 1、成功 2、最大重试次数';
COMMENT ON COLUMN sj_retry.task_type IS '任务类型 1、重试数据 2、回调数据';
COMMENT ON COLUMN sj_retry.bucket_index IS 'bucket';
COMMENT ON COLUMN sj_retry.parent_id IS '父节点id';
COMMENT ON COLUMN sj_retry.deleted IS '逻辑删除';
COMMENT ON COLUMN sj_retry.create_dt IS '创建时间';
COMMENT ON COLUMN sj_retry.update_dt IS '修改时间';
COMMENT ON TABLE sj_retry IS '重试信息表';
-- sj_retry_task_log
CREATE TABLE sj_retry_task_log
-- sj_retry_task
CREATE TABLE sj_retry_task
(
id bigserial PRIMARY KEY,
namespace_id varchar(64) NOT NULL DEFAULT '764d604ec6fc45f68cd92514c40e9e1a',
unique_id varchar(64) NOT NULL,
group_name varchar(64) NOT NULL,
scene_name varchar(64) NOT NULL,
idempotent_id varchar(64) NOT NULL,
biz_no varchar(64) NOT NULL DEFAULT '',
executor_name varchar(512) NOT NULL DEFAULT '',
args_str text NOT NULL,
ext_attrs text NOT NULL,
retry_status smallint NOT NULL DEFAULT 0,
task_type smallint NOT NULL DEFAULT 1,
create_dt timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
update_dt timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
id bigserial PRIMARY KEY,
namespace_id varchar(64) NOT NULL DEFAULT '764d604ec6fc45f68cd92514c40e9e1a',
group_name varchar(64) NOT NULL,
scene_name varchar(64) NOT NULL,
retry_id bigint NOT NULL,
ext_attrs text NOT NULL,
task_status smallint NOT NULL DEFAULT 1,
task_type smallint NOT NULL DEFAULT 1,
operation_reason smallint NOT NULL DEFAULT 0,
client_info varchar(128) NULL DEFAULT NULL,
create_dt timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
update_dt timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
);
CREATE INDEX idx_sj_retry_task_log_01 ON sj_retry_task_log (namespace_id, group_name, scene_name);
CREATE INDEX idx_sj_retry_task_log_02 ON sj_retry_task_log (retry_status);
CREATE INDEX idx_sj_retry_task_log_03 ON sj_retry_task_log (idempotent_id);
CREATE INDEX idx_sj_retry_task_log_04 ON sj_retry_task_log (unique_id);
CREATE INDEX idx_sj_retry_task_log_05 ON sj_retry_task_log (biz_no);
CREATE INDEX idx_sj_retry_task_log_06 ON sj_retry_task_log (create_dt);
CREATE INDEX idx_sj_retry_task_01 ON sj_retry_task (namespace_id, group_name, scene_name);
CREATE INDEX idx_sj_retry_task_02 ON sj_retry_task (task_status);
CREATE INDEX idx_sj_retry_task_03 ON sj_retry_task (create_dt);
CREATE INDEX idx_sj_retry_task_04 ON sj_retry_task (retry_id);
COMMENT ON COLUMN sj_retry_task_log.id IS '主键';
COMMENT ON COLUMN sj_retry_task_log.namespace_id IS '命名空间id';
COMMENT ON COLUMN sj_retry_task_log.unique_id IS '同组下id唯一';
COMMENT ON COLUMN sj_retry_task_log.group_name IS '名称';
COMMENT ON COLUMN sj_retry_task_log.scene_name IS '场景名称';
COMMENT ON COLUMN sj_retry_task_log.idempotent_id IS '幂等id';
COMMENT ON COLUMN sj_retry_task_log.biz_no IS '业务编号';
COMMENT ON COLUMN sj_retry_task_log.executor_name IS '执行器名称';
COMMENT ON COLUMN sj_retry_task_log.args_str IS '执行方法参数';
COMMENT ON COLUMN sj_retry_task_log.ext_attrs IS '扩展字段';
COMMENT ON COLUMN sj_retry_task_log.retry_status IS '重试状态 0、重试中 1、成功 2、最大次数';
COMMENT ON COLUMN sj_retry_task_log.task_type IS '任务类型 1、重试数据 2、回调数据';
COMMENT ON COLUMN sj_retry_task_log.create_dt IS '创建时间';
COMMENT ON COLUMN sj_retry_task_log.update_dt IS '修改时间';
COMMENT ON TABLE sj_retry_task_log IS '任务日志基础信息表';
COMMENT ON COLUMN sj_retry_task.id IS '主键';
COMMENT ON COLUMN sj_retry_task.namespace_id IS '命名空间id';
COMMENT ON COLUMN sj_retry_task.group_name IS '组名称';
COMMENT ON COLUMN sj_retry_task.scene_name IS '场景名称';
COMMENT ON COLUMN sj_retry_task.retry_id IS '重试信息Id';
COMMENT ON COLUMN sj_retry_task.ext_attrs IS '扩展字段';
COMMENT ON COLUMN sj_retry_task.task_status IS '重试状态';
COMMENT ON COLUMN sj_retry_task.task_type IS '任务类型 1、重试数据 2、回调数据';
COMMENT ON COLUMN sj_retry_task.operation_reason IS '操作原因';
COMMENT ON COLUMN sj_retry_task.client_info IS '客户端地址 clientId#ip:port';
COMMENT ON COLUMN sj_retry_task.create_dt IS '创建时间';
COMMENT ON COLUMN sj_retry_task.update_dt IS '修改时间';
COMMENT ON TABLE sj_retry_task IS '重试任务表';
-- sj_retry_task_log_message
CREATE TABLE sj_retry_task_log_message
(
id bigserial PRIMARY KEY,
namespace_id varchar(64) NOT NULL DEFAULT '764d604ec6fc45f68cd92514c40e9e1a',
group_name varchar(64) NOT NULL,
unique_id varchar(64) NOT NULL,
message text NOT NULL,
log_num int NOT NULL DEFAULT 1,
real_time bigint NOT NULL DEFAULT 0,
create_dt timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
id bigserial PRIMARY KEY,
namespace_id varchar(64) NOT NULL DEFAULT '764d604ec6fc45f68cd92514c40e9e1a',
group_name varchar(64) NOT NULL,
retry_id bigint NOT NULL,
retry_task_id bigint NOT NULL,
message text NOT NULL,
log_num int NOT NULL DEFAULT 1,
real_time bigint NOT NULL DEFAULT 0,
create_dt timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
);
CREATE INDEX idx_sj_retry_task_log_message_01 ON sj_retry_task_log_message (namespace_id, group_name, unique_id);
CREATE INDEX idx_sj_retry_task_log_message_01 ON sj_retry_task_log_message (namespace_id, group_name, retry_task_id);
CREATE INDEX idx_sj_retry_task_log_message_02 ON sj_retry_task_log_message (create_dt);
COMMENT ON COLUMN sj_retry_task_log_message.id IS '主键';
COMMENT ON COLUMN sj_retry_task_log_message.namespace_id IS '命名空间id';
COMMENT ON COLUMN sj_retry_task_log_message.group_name IS '组名称';
COMMENT ON COLUMN sj_retry_task_log_message.unique_id IS '同组下id唯一';
COMMENT ON COLUMN sj_retry_task_log_message.retry_id IS '重试信息Id';
COMMENT ON COLUMN sj_retry_task_log_message.retry_task_id IS '重试任务Id';
COMMENT ON COLUMN sj_retry_task_log_message.message IS '异常信息';
COMMENT ON COLUMN sj_retry_task_log_message.log_num IS '日志数量';
COMMENT ON COLUMN sj_retry_task_log_message.real_time IS '上报时间';
@@ -278,20 +270,26 @@ COMMENT ON TABLE sj_retry_task_log_message IS '任务调度日志信息记录表
-- sj_retry_scene_config
CREATE TABLE sj_retry_scene_config
(
id bigserial PRIMARY KEY,
namespace_id varchar(64) NOT NULL DEFAULT '764d604ec6fc45f68cd92514c40e9e1a',
scene_name varchar(64) NOT NULL,
group_name varchar(64) NOT NULL,
scene_status smallint NOT NULL DEFAULT 0,
max_retry_count int NOT NULL DEFAULT 5,
back_off smallint NOT NULL DEFAULT 1,
trigger_interval varchar(16) NOT NULL DEFAULT '',
deadline_request bigint NOT NULL DEFAULT 60000,
executor_timeout int NOT NULL DEFAULT 5,
route_key smallint NOT NULL DEFAULT 4,
description varchar(256) NOT NULL DEFAULT '',
create_dt timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
update_dt timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
id bigserial PRIMARY KEY,
namespace_id varchar(64) NOT NULL DEFAULT '764d604ec6fc45f68cd92514c40e9e1a',
scene_name varchar(64) NOT NULL,
group_name varchar(64) NOT NULL,
scene_status smallint NOT NULL DEFAULT 0,
max_retry_count int NOT NULL DEFAULT 5,
back_off smallint NOT NULL DEFAULT 1,
trigger_interval varchar(16) NOT NULL DEFAULT '',
notify_ids varchar(128) NOT NULL DEFAULT '',
deadline_request bigint NOT NULL DEFAULT 60000,
executor_timeout int NOT NULL DEFAULT 5,
route_key smallint NOT NULL DEFAULT 4,
block_strategy smallint NOT NULL DEFAULT 1,
cb_status smallint NOT NULL DEFAULT 0,
cb_trigger_type smallint NOT NULL DEFAULT 1,
cb_max_count int NOT NULL DEFAULT 16,
cb_trigger_interval varchar(16) NOT NULL DEFAULT '',
description varchar(256) NOT NULL DEFAULT '',
create_dt timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
update_dt timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
);
CREATE UNIQUE INDEX uk_sj_retry_scene_config_01 ON sj_retry_scene_config (namespace_id, group_name, scene_name);
@@ -304,9 +302,15 @@ COMMENT ON COLUMN sj_retry_scene_config.scene_status IS '组状态 0、未启用
COMMENT ON COLUMN sj_retry_scene_config.max_retry_count IS '最大重试次数';
COMMENT ON COLUMN sj_retry_scene_config.back_off IS '1、默认等级 2、固定间隔时间 3、CRON 表达式';
COMMENT ON COLUMN sj_retry_scene_config.trigger_interval IS '间隔时长';
COMMENT ON COLUMN sj_retry_scene_config.notify_ids IS '通知告警场景配置id列表';
COMMENT ON COLUMN sj_retry_scene_config.deadline_request IS 'Deadline Request 调用链超时 单位毫秒';
COMMENT ON COLUMN sj_retry_scene_config.executor_timeout IS '任务执行超时时间,单位秒';
COMMENT ON COLUMN sj_retry_scene_config.route_key IS '路由策略';
COMMENT ON COLUMN sj_retry_scene_config.block_strategy IS '阻塞策略 1、丢弃 2、覆盖 3、并行';
COMMENT ON COLUMN sj_retry_scene_config.cb_status IS '回调状态 0、不开启 1、开启';
COMMENT ON COLUMN sj_retry_scene_config.cb_trigger_type IS '1、默认等级 2、固定间隔时间 3、CRON 表达式';
COMMENT ON COLUMN sj_retry_scene_config.cb_max_count IS '回调的最大执行次数';
COMMENT ON COLUMN sj_retry_scene_config.cb_trigger_interval IS '回调的最大执行次数';
COMMENT ON COLUMN sj_retry_scene_config.description IS '描述';
COMMENT ON COLUMN sj_retry_scene_config.create_dt IS '创建时间';
COMMENT ON COLUMN sj_retry_scene_config.update_dt IS '修改时间';
@@ -349,7 +353,7 @@ COMMENT ON TABLE sj_server_node IS '服务器节点';
-- sj_distributed_lock
CREATE TABLE sj_distributed_lock
(
name varchar(64) PRIMARY KEY,
name varchar(64) NOT NULL,
lock_until timestamp(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
locked_at timestamp(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
locked_by varchar(255) NOT NULL,
@@ -450,6 +454,8 @@ CREATE TABLE sj_job
retry_interval int NOT NULL DEFAULT 0,
bucket_index int NOT NULL DEFAULT 0,
resident smallint NOT NULL DEFAULT 0,
notify_ids varchar(128) NOT NULL DEFAULT '',
owner_id bigint NULL,
description varchar(256) NOT NULL DEFAULT '',
ext_attrs varchar(256) NULL DEFAULT '',
deleted smallint NOT NULL DEFAULT 0,
@@ -475,13 +481,15 @@ COMMENT ON COLUMN sj_job.executor_type IS '执行器类型';
COMMENT ON COLUMN sj_job.executor_info IS '执行器名称';
COMMENT ON COLUMN sj_job.trigger_type IS '触发类型 1.CRON 表达式 2. 固定时间';
COMMENT ON COLUMN sj_job.trigger_interval IS '间隔时长';
COMMENT ON COLUMN sj_job.block_strategy IS '阻塞策略 1、丢弃 2、覆盖 3、并行';
COMMENT ON COLUMN sj_job.block_strategy IS '阻塞策略 1、丢弃 2、覆盖 3、并行 4、恢复';
COMMENT ON COLUMN sj_job.executor_timeout IS '任务执行超时时间,单位秒';
COMMENT ON COLUMN sj_job.max_retry_times IS '最大重试次数';
COMMENT ON COLUMN sj_job.parallel_num IS '并行数';
COMMENT ON COLUMN sj_job.retry_interval IS '重试间隔 ( s ) ';
COMMENT ON COLUMN sj_job.retry_interval IS '重试间隔 ( s)';
COMMENT ON COLUMN sj_job.bucket_index IS 'bucket';
COMMENT ON COLUMN sj_job.resident IS '是否是常驻任务';
COMMENT ON COLUMN sj_job.notify_ids IS '通知告警场景配置id列表';
COMMENT ON COLUMN sj_job.owner_id IS '负责人id';
COMMENT ON COLUMN sj_job.description IS '描述';
COMMENT ON COLUMN sj_job.ext_attrs IS '扩展字段';
COMMENT ON COLUMN sj_job.deleted IS '逻辑删除 1、删除';
@@ -642,7 +650,7 @@ CREATE INDEX idx_sj_job_summary_01 ON sj_job_summary (namespace_id, group_name,
COMMENT ON COLUMN sj_job_summary.id IS '主键';
COMMENT ON COLUMN sj_job_summary.namespace_id IS '命名空间id';
COMMENT ON COLUMN sj_job_summary.group_name IS '组名称';
COMMENT ON COLUMN sj_job_summary.business_id IS '业务id ( job_id或workflow_id ) ';
COMMENT ON COLUMN sj_job_summary.business_id IS '业务id ( job_id或workflow_id)';
COMMENT ON COLUMN sj_job_summary.system_task_type IS '任务类型 3、JOB任务 4、WORKFLOW任务';
COMMENT ON COLUMN sj_job_summary.trigger_at IS '统计时间';
COMMENT ON COLUMN sj_job_summary.success_num IS '执行成功-日志数量';
@@ -705,6 +713,7 @@ CREATE TABLE sj_workflow
description varchar(256) NOT NULL DEFAULT '',
flow_info text NULL DEFAULT NULL,
wf_context text NULL DEFAULT NULL,
notify_ids varchar(128) NOT NULL DEFAULT '',
bucket_index int NOT NULL DEFAULT 0,
version int NOT NULL,
ext_attrs varchar(256) NULL DEFAULT '',
@@ -729,6 +738,7 @@ COMMENT ON COLUMN sj_workflow.executor_timeout IS '任务执行超时时间,
COMMENT ON COLUMN sj_workflow.description IS '描述';
COMMENT ON COLUMN sj_workflow.flow_info IS '流程信息';
COMMENT ON COLUMN sj_workflow.wf_context IS '上下文';
COMMENT ON COLUMN sj_workflow.notify_ids IS '通知告警场景配置id列表';
COMMENT ON COLUMN sj_workflow.bucket_index IS 'bucket';
COMMENT ON COLUMN sj_workflow.version IS '版本号';
COMMENT ON COLUMN sj_workflow.ext_attrs IS '扩展字段';