WebAPI responds or async handles requests for data source priority during initial application loading.
Actual behavior
WebAPI will block until a 'select 1' is executed against all data sources configured. This is problematic in cases where database platforms have idle/standby modes where upon receiving a query they take several minutes to initialize before being able to respond to the query. (ie, databricks, redshift serverless, spark serverless)
Expected behavior
WebAPI responds or async handles requests for data source priority during initial application loading.
Actual behavior
WebAPI will block until a 'select 1' is executed against all data sources configured. This is problematic in cases where database platforms have idle/standby modes where upon receiving a query they take several minutes to initialize before being able to respond to the query. (ie, databricks, redshift serverless, spark serverless)
This check connection appears to be the cause of the issue: https://github.com/OHDSI/WebAPI/blob/master/src/main/java/org/ohdsi/webapi/source/SourceService.java#L108
For responding to priority it might be better to only make use of the data in the daimon tables without performing a connection test.