Skip to content

Commit

Permalink
check one at a time
Browse files Browse the repository at this point in the history
  • Loading branch information
soulgalore committed Nov 11, 2024
1 parent 043d067 commit c10e6d1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion server/src/database/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,8 @@ export async function getTestHar(id) {
export async function testConnection(retries = 3, delay = 5000) {
const test = 'SELECT 1 FROM sitespeed_io_test_runs';
try {
const result = await DatabaseHelper.getInstance().query(test);
const databaseHelper = DatabaseHelper.getInstance();
const result = await databaseHelper.query(test);
return result.rows[0];
} catch (error) {
logError('Could not get a connection to the database', error);
Expand Down

0 comments on commit c10e6d1

Please sign in to comment.