mirror of
https://gitee.com/dolphinscheduler/DolphinScheduler.git
synced 2024-12-03 20:58:11 +08:00
change datasource null check position (#1883)
This commit is contained in:
parent
42b3e5bd10
commit
78bfe918d0
@ -123,6 +123,14 @@ public class SqlTask extends AbstractTask {
|
||||
}
|
||||
|
||||
dataSource= processDao.findDataSourceById(sqlParameters.getDatasource());
|
||||
|
||||
// data source is null
|
||||
if (dataSource == null){
|
||||
logger.error("datasource not exists");
|
||||
exitStatusCode = -1;
|
||||
return;
|
||||
}
|
||||
|
||||
logger.info("datasource name : {} , type : {} , desc : {} , user_id : {} , parameter : {}",
|
||||
dataSource.getName(),
|
||||
dataSource.getType(),
|
||||
@ -130,12 +138,6 @@ public class SqlTask extends AbstractTask {
|
||||
dataSource.getUserId(),
|
||||
dataSource.getConnectionParams());
|
||||
|
||||
if (dataSource == null){
|
||||
logger.error("datasource not exists");
|
||||
exitStatusCode = -1;
|
||||
return;
|
||||
}
|
||||
|
||||
Connection con = null;
|
||||
List<String> createFuncs = null;
|
||||
try {
|
||||
|
Loading…
Reference in New Issue
Block a user