Skip to content
Snippets Groups Projects
Commit 81c96d57 authored by Simon Malesys's avatar Simon Malesys
Browse files

Remove databaseIsSync to avoid issues

parent c20e1ebb
No related branches found
No related tags found
No related merge requests found
Pipeline #151064 passed
...@@ -37,7 +37,6 @@ import downloadsRoute from './routes/downloadsRoute.js' ...@@ -37,7 +37,6 @@ import downloadsRoute from './routes/downloadsRoute.js'
import healthCheckRoute from './routes/healthCheckRoute.js' import healthCheckRoute from './routes/healthCheckRoute.js'
import readyCheckRoute from './routes/readyCheckRoute.js' import readyCheckRoute from './routes/readyCheckRoute.js'
import statisticsRoute from './routes/statisticsRoute.js' import statisticsRoute from './routes/statisticsRoute.js'
import databaseIsSync from './utils/databaseIsSync.js'
/** /**
* Setup the fastify instance with custom * Setup the fastify instance with custom
...@@ -165,9 +164,7 @@ fastify.listen({ ...@@ -165,9 +164,7 @@ fastify.listen({
host: envConfig.ABSD_SERVER_HOST, host: envConfig.ABSD_SERVER_HOST,
port: envConfig.ABSD_SERVER_PORT port: envConfig.ABSD_SERVER_PORT
}).then(async () => { }).then(async () => {
const dbShouldBeRebuilt = !await databaseIsSync(fastify) if (envConfig.NODE_ENV === 'production') {
if (envConfig.NODE_ENV === 'production' && dbShouldBeRebuilt) {
return await buildDatabase() return await buildDatabase()
} }
}).then((dbResults) => { }).then((dbResults) => {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment