fix: job with expression interval cannot repeat
This commit is contained in:
parent
7223e9e121
commit
0052ee98b6
@ -322,6 +322,10 @@ int ObDBMSSchedTableOperator::update_for_end(ObDBMSSchedJobInfo &job_info, int e
|
||||
OZ (_check_need_record(job_info, need_record, false));
|
||||
|
||||
if (OB_FAIL(ret)) {
|
||||
} else if (job_info.is_date_expression_job_class()) {
|
||||
if (now >= job_info.end_date_ && true == job_info.auto_drop_) {
|
||||
OZ (_build_job_drop_dml(now, job_info, sql1));
|
||||
}
|
||||
} else if ((now >= job_info.end_date_ || job_info.get_interval_ts() == 0) && (true == job_info.auto_drop_)) {
|
||||
OZ (_build_job_drop_dml(now, job_info, sql1));
|
||||
} else {
|
||||
@ -331,6 +335,10 @@ int ObDBMSSchedTableOperator::update_for_end(ObDBMSSchedJobInfo &job_info, int e
|
||||
if (OB_SUCC(ret) && ((job_info.flag_ & 0x1) != 0)) {
|
||||
// when if failures > 16 then set broken state.
|
||||
job_info.state_ = ObString("BROKEN");
|
||||
} else if (job_info.is_date_expression_job_class()) {
|
||||
if (now >= job_info.end_date_) {
|
||||
job_info.state_ = ObString("COMPLETED");
|
||||
}
|
||||
} else if (now >= job_info.end_date_ || job_info.get_interval_ts() == 0) {
|
||||
// when end_date is reach and auto_drop is set false, disable set completed state.
|
||||
// for once job, not wait until end date, set completed state when running end
|
||||
|
Loading…
x
Reference in New Issue
Block a user