Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
fix custom datasouce get table list bug
  • Loading branch information
RichardShan committed Nov 1, 2018
1 parent 4f3f775 commit 64de424
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ spark-warehouse
*.log
*.conf
config/application.yml
config/datasource_driver.yml
swagger-ui/
tempFiles/
userfiles/
Expand Down
3 changes: 2 additions & 1 deletion server/src/main/java/edp/core/utils/SqlUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,8 @@ public List<TableInfo> getTableList() throws SourceException {
if (null != connection) {
DatabaseMetaData metaData = connection.getMetaData();
String schemaPattern = null;
if (DataTypeEnum.ORACLE.getFeature().equals(DataTypeEnum.urlOf(this.jdbcUrl).getFeature())) {
DataTypeEnum dataTypeEnum = DataTypeEnum.urlOf(this.jdbcUrl);
if (null != dataTypeEnum && dataTypeEnum.getFeature().equals(DataTypeEnum.ORACLE.getFeature())) {
schemaPattern = this.username;
if (null != schemaPattern) {
schemaPattern = schemaPattern.toUpperCase();
Expand Down
8 changes: 6 additions & 2 deletions server/src/main/java/edp/davinci/runner/CronJobRunner.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,12 @@ public class CronJobRunner implements ApplicationRunner {
* @throws Exception
*/
@Override
public void run(ApplicationArguments args) throws Exception {
cronJobService.startAllJobs();
public void run(ApplicationArguments args) {
try {
cronJobService.startAllJobs();
} catch (Exception e) {
log.error(e.getMessage());
}
log.info("Load cron job finish");
}
}

0 comments on commit 64de424

Please sign in to comment.