Skip to content

Commit

Permalink
[Fix][Server] Fix Catalog meta data fetch Quartz task parameter excep…
Browse files Browse the repository at this point in the history
…tion (#272)
  • Loading branch information
xxzuo authored Nov 7, 2023
1 parent 0c222ea commit ccb6d38
Showing 1 changed file with 4 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,19 +89,16 @@ private CatalogMetaDataFetchTaskSchedule create(CatalogMetaDataFetchTaskSchedule
if (dataSource == null) {
throw new DataVinesServerException(Status.DATASOURCE_NOT_EXIST_ERROR, dataSourceId);
} else {

if (baseMapper.insert(catalogMetaDataFetchTaskSchedule) <= 0) {
log.info("create catalog task schedule fail : {}", catalogMetaDataFetchTaskSchedule);
throw new DataVinesServerException(Status.CREATE_CATALOG_TASK_SCHEDULE_ERROR);
}
try {
addScheduleJob(scheduleCreateOrUpdate, catalogMetaDataFetchTaskSchedule);
} catch (Exception e) {
throw new DataVinesServerException(Status.ADD_QUARTZ_ERROR);
}
}

if (baseMapper.insert(catalogMetaDataFetchTaskSchedule) <= 0) {
log.info("create catalog task schedule fail : {}", catalogMetaDataFetchTaskSchedule);
throw new DataVinesServerException(Status.CREATE_CATALOG_TASK_SCHEDULE_ERROR);
}

log.info("create job schedule success: datasource id : {}, cronExpression : {}",
catalogMetaDataFetchTaskSchedule.getDataSourceId(),
catalogMetaDataFetchTaskSchedule.getCronExpression());
Expand Down

0 comments on commit ccb6d38

Please sign in to comment.