xxl-job原生支持Mysql,不支持pgsql,要适配Pgsql的需要修改部分代码。
xxl-job最新版2.3.1修改支持Pgsql、PostgreSQL版本
下面的所有修改基于xxl-job的2.3.1版本
下面的所有修改基于xxl-job的2.3.1版本
下面的所有修改基于xxl-job的2.3.1版本
1、修改Sql脚本
CREATE TABLE xxl_job_info (
id serial constraint xxl_job_info_pkey primary key,
job_group integer NOT NULL,
job_desc varchar(255) NOT NULL,
add_time timestamp DEFAULT NULL,
update_time timestamp DEFAULT NULL,
author varchar(64) DEFAULT NULL ,
alarm_email varchar(255) DEFAULT NULL ,
schedule_type varchar(50) NOT NULL DEFAULT 'NONE' ,
schedule_conf varchar(128) DEFAULT NULL,
misfire_strategy varchar(50) NOT NULL DEFAULT 'DO_NOTHING' ,
executor_route_strategy varchar(50) DEFAULT NULL ,
executor_handler varchar(255) DEFAULT NULL ,
executor_param varchar(512) DEFAULT NULL ,
executor_block_strategy varchar(50) DEFAULT NULL ,
executor_timeout integer NOT NULL DEFAULT '0',
executor_fail_retry_count integer NOT NULL DEFAULT '0' ,
glue_type varchar(50) NOT NULL ,
glue_source text ,
glue_remark varchar(128) DEFAULT NULL ,
glue_updatetime timestamp DEFAULT NULL ,
child_jobid varchar(255) DEFAULT NULL ,
trigger_status smallint NOT NULL DEFAULT '0' ,
trigger_last_time bigint NOT NULL DEFAULT '0' ,
trigger_next_time bigint NOT NULL DEFAULT '0'
);
comment on table xxl_job_info is '任务信息表';
comment on column xxl_job_info.id is '主键';
comment on column xxl_job_info.job_group is '执行器主键ID';
comment on column xxl_job_info.job_desc is '任务描述';
comment on column xxl_job_info.add_time is '任务创建时间';
comment on column xxl_job_info.update_time is '任务更新时间';
comment on column xxl_job_info.author is '作者';
comment on column xxl_job_info.alarm_email is '报警邮件';
comment on column xxl_job_info.schedule_type is '调度类型';
comment on column xxl_job_info.schedule_conf is '调度配置,值含义取决于调度类型';
comment on column xxl_job_info.misfire_strategy is '调度过期策略';
comment on column xxl_job_info.executor_route_strategy is '执行器路由策略';
comment on column xxl_job_info.executor_handler is '执行器任务handler';
comment on column xxl_job_info.executor_param i