Skip to content

Commit

Permalink
Default validateOnHeartbeat = !System.getenv().containsKey("LAMBDA_TA…
Browse files Browse the repository at this point in the history
…SK_ROOT");

With this we can then remove the explicit experimental lambdaMode() and just auto detect it. When running in lambda we don't want to validate connections in a background task due to lambda suspend.
  • Loading branch information
rbygrave committed Jun 14, 2024
1 parent 22f44c9 commit 2c410e6
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public class DataSourceConfig implements DataSourceBuilder.Settings {
private Properties clientInfo;
private String applicationName;
private boolean shutdownOnJvmExit;
private boolean validateOnHeartbeat = true;
private boolean validateOnHeartbeat = !System.getenv().containsKey("LAMBDA_TASK_ROOT");

@Override
public Settings settings() {
Expand Down

0 comments on commit 2c410e6

Please sign in to comment.