cherry-pick [Bug] [API] The task priority and process instance priority might be null and cause NPE (#11969)
This commit is contained in:
parent
6fec9e2f08
commit
75f93b60ad
|
|
@ -160,7 +160,7 @@ public class SchedulerController extends BaseController {
|
|||
@RequestParam(value = "failureStrategy", required = false, defaultValue = "END") FailureStrategy failureStrategy,
|
||||
@RequestParam(value = "workerGroup", required = false, defaultValue = "default") String workerGroup,
|
||||
@RequestParam(value = "environmentCode", required = false, defaultValue = "-1") Long environmentCode,
|
||||
@RequestParam(value = "processInstancePriority", required = false) Priority processInstancePriority) {
|
||||
@RequestParam(value = "processInstancePriority", required = false, defaultValue = DEFAULT_PROCESS_INSTANCE_PRIORITY) Priority processInstancePriority) {
|
||||
|
||||
Map<String, Object> result = schedulerService.updateSchedule(loginUser, projectCode, id, schedule,
|
||||
warningType, warningGroupId, failureStrategy, processInstancePriority, workerGroup, environmentCode);
|
||||
|
|
|
|||
|
|
@ -331,7 +331,7 @@ CREATE TABLE t_ds_command
|
|||
start_time datetime DEFAULT NULL,
|
||||
executor_id int(11) DEFAULT NULL,
|
||||
update_time datetime DEFAULT NULL,
|
||||
process_instance_priority int(11) DEFAULT NULL,
|
||||
process_instance_priority int(11) DEFAULT '2',
|
||||
worker_group varchar(64),
|
||||
environment_code bigint(20) DEFAULT '-1',
|
||||
dry_run int NULL DEFAULT 0,
|
||||
|
|
@ -385,7 +385,7 @@ CREATE TABLE t_ds_error_command
|
|||
schedule_time datetime DEFAULT NULL,
|
||||
start_time datetime DEFAULT NULL,
|
||||
update_time datetime DEFAULT NULL,
|
||||
process_instance_priority int(11) DEFAULT NULL,
|
||||
process_instance_priority int(11) DEFAULT '2',
|
||||
worker_group varchar(64),
|
||||
environment_code bigint(20) DEFAULT '-1',
|
||||
message text,
|
||||
|
|
@ -475,7 +475,7 @@ CREATE TABLE t_ds_task_definition
|
|||
task_type varchar(50) NOT NULL,
|
||||
task_params longtext,
|
||||
flag tinyint(2) DEFAULT NULL,
|
||||
task_priority tinyint(4) DEFAULT NULL,
|
||||
task_priority tinyint(4) DEFAULT '2',
|
||||
worker_group varchar(200) DEFAULT NULL,
|
||||
environment_code bigint(20) DEFAULT '-1',
|
||||
fail_retry_times int(11) DEFAULT NULL,
|
||||
|
|
@ -508,7 +508,7 @@ CREATE TABLE t_ds_task_definition_log
|
|||
task_type varchar(50) NOT NULL,
|
||||
task_params text,
|
||||
flag tinyint(2) DEFAULT NULL,
|
||||
task_priority tinyint(4) DEFAULT NULL,
|
||||
task_priority tinyint(4) DEFAULT '2',
|
||||
worker_group varchar(200) DEFAULT NULL,
|
||||
environment_code bigint(20) DEFAULT '-1',
|
||||
fail_retry_times int(11) DEFAULT NULL,
|
||||
|
|
@ -604,7 +604,7 @@ CREATE TABLE t_ds_process_instance
|
|||
is_sub_process int(11) DEFAULT '0',
|
||||
executor_id int(11) NOT NULL,
|
||||
history_cmd text,
|
||||
process_instance_priority int(11) DEFAULT NULL,
|
||||
process_instance_priority int(11) DEFAULT '2',
|
||||
worker_group varchar(64) DEFAULT NULL,
|
||||
environment_code bigint(20) DEFAULT '-1',
|
||||
timeout int(11) DEFAULT '0',
|
||||
|
|
@ -797,7 +797,7 @@ CREATE TABLE t_ds_schedules
|
|||
release_state tinyint(4) NOT NULL,
|
||||
warning_type tinyint(4) NOT NULL,
|
||||
warning_group_id int(11) DEFAULT NULL,
|
||||
process_instance_priority int(11) DEFAULT NULL,
|
||||
process_instance_priority int(11) DEFAULT '2',
|
||||
worker_group varchar(64) DEFAULT '',
|
||||
environment_code bigint(20) DEFAULT '-1',
|
||||
create_time datetime NOT NULL,
|
||||
|
|
|
|||
|
|
@ -339,7 +339,7 @@ CREATE TABLE `t_ds_command` (
|
|||
`start_time` datetime DEFAULT NULL COMMENT 'start time',
|
||||
`executor_id` int(11) DEFAULT NULL COMMENT 'executor id',
|
||||
`update_time` datetime DEFAULT NULL COMMENT 'update time',
|
||||
`process_instance_priority` int(11) DEFAULT NULL COMMENT 'process instance priority: 0 Highest,1 High,2 Medium,3 Low,4 Lowest',
|
||||
`process_instance_priority` int(11) DEFAULT '2' COMMENT 'process instance priority: 0 Highest,1 High,2 Medium,3 Low,4 Lowest',
|
||||
`worker_group` varchar(64) COMMENT 'worker group',
|
||||
`environment_code` bigint(20) DEFAULT '-1' COMMENT 'environment code',
|
||||
`dry_run` tinyint(4) DEFAULT '0' COMMENT 'dry run flag:0 normal, 1 dry run',
|
||||
|
|
@ -391,7 +391,7 @@ CREATE TABLE `t_ds_error_command` (
|
|||
`schedule_time` datetime DEFAULT NULL COMMENT 'scheduler time',
|
||||
`start_time` datetime DEFAULT NULL COMMENT 'start time',
|
||||
`update_time` datetime DEFAULT NULL COMMENT 'update time',
|
||||
`process_instance_priority` int(11) DEFAULT NULL COMMENT 'process instance priority, 0 Highest,1 High,2 Medium,3 Low,4 Lowest',
|
||||
`process_instance_priority` int(11) DEFAULT '2' COMMENT 'process instance priority, 0 Highest,1 High,2 Medium,3 Low,4 Lowest',
|
||||
`worker_group` varchar(64) COMMENT 'worker group',
|
||||
`environment_code` bigint(20) DEFAULT '-1' COMMENT 'environment code',
|
||||
`message` text COMMENT 'message',
|
||||
|
|
@ -475,7 +475,7 @@ CREATE TABLE `t_ds_task_definition` (
|
|||
`task_type` varchar(50) NOT NULL COMMENT 'task type',
|
||||
`task_params` longtext COMMENT 'job custom parameters',
|
||||
`flag` tinyint(2) DEFAULT NULL COMMENT '0 not available, 1 available',
|
||||
`task_priority` tinyint(4) DEFAULT NULL COMMENT 'job priority',
|
||||
`task_priority` tinyint(4) DEFAULT '2' COMMENT 'job priority',
|
||||
`worker_group` varchar(200) DEFAULT NULL COMMENT 'worker grouping',
|
||||
`environment_code` bigint(20) DEFAULT '-1' COMMENT 'environment code',
|
||||
`fail_retry_times` int(11) DEFAULT NULL COMMENT 'number of failed retries',
|
||||
|
|
@ -507,7 +507,7 @@ CREATE TABLE `t_ds_task_definition_log` (
|
|||
`task_type` varchar(50) NOT NULL COMMENT 'task type',
|
||||
`task_params` longtext COMMENT 'job custom parameters',
|
||||
`flag` tinyint(2) DEFAULT NULL COMMENT '0 not available, 1 available',
|
||||
`task_priority` tinyint(4) DEFAULT NULL COMMENT 'job priority',
|
||||
`task_priority` tinyint(4) DEFAULT '2' COMMENT 'job priority',
|
||||
`worker_group` varchar(200) DEFAULT NULL COMMENT 'worker grouping',
|
||||
`environment_code` bigint(20) DEFAULT '-1' COMMENT 'environment code',
|
||||
`fail_retry_times` int(11) DEFAULT NULL COMMENT 'number of failed retries',
|
||||
|
|
@ -606,7 +606,7 @@ CREATE TABLE `t_ds_process_instance` (
|
|||
`is_sub_process` int(11) DEFAULT '0' COMMENT 'flag, whether the process is sub process',
|
||||
`executor_id` int(11) NOT NULL COMMENT 'executor id',
|
||||
`history_cmd` text COMMENT 'history commands of process instance operation',
|
||||
`process_instance_priority` int(11) DEFAULT NULL COMMENT 'process instance priority. 0 Highest,1 High,2 Medium,3 Low,4 Lowest',
|
||||
`process_instance_priority` int(11) DEFAULT '2' COMMENT 'process instance priority. 0 Highest,1 High,2 Medium,3 Low,4 Lowest',
|
||||
`worker_group` varchar(64) DEFAULT NULL COMMENT 'worker group id',
|
||||
`environment_code` bigint(20) DEFAULT '-1' COMMENT 'environment code',
|
||||
`timeout` int(11) DEFAULT '0' COMMENT 'time out',
|
||||
|
|
@ -792,7 +792,7 @@ CREATE TABLE `t_ds_schedules` (
|
|||
`release_state` tinyint(4) NOT NULL COMMENT 'release state. 0:offline,1:online ',
|
||||
`warning_type` tinyint(4) NOT NULL COMMENT 'Alarm type: 0 is not sent, 1 process is sent successfully, 2 process is sent failed, 3 process is sent successfully and all failures are sent',
|
||||
`warning_group_id` int(11) DEFAULT NULL COMMENT 'alert group id',
|
||||
`process_instance_priority` int(11) DEFAULT NULL COMMENT 'process instance priority:0 Highest,1 High,2 Medium,3 Low,4 Lowest',
|
||||
`process_instance_priority` int(11) DEFAULT '2' COMMENT 'process instance priority:0 Highest,1 High,2 Medium,3 Low,4 Lowest',
|
||||
`worker_group` varchar(64) DEFAULT '' COMMENT 'worker group id',
|
||||
`environment_code` bigint(20) DEFAULT '-1' COMMENT 'environment code',
|
||||
`create_time` datetime NOT NULL COMMENT 'create time',
|
||||
|
|
|
|||
|
|
@ -262,7 +262,7 @@ CREATE TABLE t_ds_command (
|
|||
start_time timestamp DEFAULT NULL ,
|
||||
executor_id int DEFAULT NULL ,
|
||||
update_time timestamp DEFAULT NULL ,
|
||||
process_instance_priority int DEFAULT NULL ,
|
||||
process_instance_priority int DEFAULT '2' ,
|
||||
worker_group varchar(64),
|
||||
environment_code bigint DEFAULT '-1',
|
||||
dry_run int DEFAULT '0' ,
|
||||
|
|
@ -309,7 +309,7 @@ CREATE TABLE t_ds_error_command (
|
|||
start_time timestamp DEFAULT NULL ,
|
||||
executor_id int DEFAULT NULL ,
|
||||
update_time timestamp DEFAULT NULL ,
|
||||
process_instance_priority int DEFAULT NULL ,
|
||||
process_instance_priority int DEFAULT '2' ,
|
||||
worker_group varchar(64),
|
||||
environment_code bigint DEFAULT '-1',
|
||||
dry_run int DEFAULT '0' ,
|
||||
|
|
@ -392,7 +392,7 @@ CREATE TABLE t_ds_task_definition (
|
|||
task_type varchar(50) DEFAULT NULL ,
|
||||
task_params text ,
|
||||
flag int DEFAULT NULL ,
|
||||
task_priority int DEFAULT NULL ,
|
||||
task_priority int DEFAULT '2' ,
|
||||
worker_group varchar(255) DEFAULT NULL ,
|
||||
environment_code bigint DEFAULT '-1',
|
||||
fail_retry_times int DEFAULT NULL ,
|
||||
|
|
@ -427,7 +427,7 @@ CREATE TABLE t_ds_task_definition_log (
|
|||
task_type varchar(50) DEFAULT NULL ,
|
||||
task_params text ,
|
||||
flag int DEFAULT NULL ,
|
||||
task_priority int DEFAULT NULL ,
|
||||
task_priority int DEFAULT '2' ,
|
||||
worker_group varchar(255) DEFAULT NULL ,
|
||||
environment_code bigint DEFAULT '-1',
|
||||
fail_retry_times int DEFAULT NULL ,
|
||||
|
|
@ -534,7 +534,7 @@ CREATE TABLE t_ds_process_instance (
|
|||
executor_id int NOT NULL ,
|
||||
history_cmd text ,
|
||||
dependence_schedule_times text ,
|
||||
process_instance_priority int DEFAULT NULL ,
|
||||
process_instance_priority int DEFAULT '2' ,
|
||||
worker_group varchar(64) ,
|
||||
environment_code bigint DEFAULT '-1',
|
||||
timeout int DEFAULT '0' ,
|
||||
|
|
@ -703,7 +703,7 @@ CREATE TABLE t_ds_schedules (
|
|||
release_state int NOT NULL ,
|
||||
warning_type int NOT NULL ,
|
||||
warning_group_id int DEFAULT NULL ,
|
||||
process_instance_priority int DEFAULT NULL ,
|
||||
process_instance_priority int DEFAULT '2' ,
|
||||
worker_group varchar(64),
|
||||
environment_code bigint DEFAULT '-1',
|
||||
create_time timestamp NOT NULL ,
|
||||
|
|
|
|||
Loading…
Reference in New Issue