Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
pablomendezroyo committed Jan 17, 2024
2 parents 667f6db + add7b96 commit 7bf8e6f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions packages/dappmanager/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as db from "@dappnode/db";
import { eventBus } from "@dappnode/eventbus";
import initializeDb from "./initializeDb.js";
import { initializeDb } from "./initializeDb.js";
import {
checkDockerNetwork,
copyHostScripts,
Expand Down Expand Up @@ -35,6 +35,11 @@ import { DappNodeRegistry } from "@dappnode/toolkit";

const controller = new AbortController();

// Initialize DB must be the first step so the db has the required values
initializeDb()
.then(() => logs.info("Initialized Database"))
.catch(e => logs.error("Error inititializing Database", e));

const ethUrl = await getEthUrl().catch(e => {
logs.error(
`Error getting ethUrl, using default ${params.ETH_MAINNET_RPC_URL_REMOTE}`,
Expand Down Expand Up @@ -86,11 +91,6 @@ if (params.TEST) startTestApi();
// Execute migrations
executeMigrations().catch(e => logs.error("Error on executeMigrations", e));

// Initialize DB
initializeDb()
.then(() => logs.info("Initialized Database"))
.catch(e => logs.error("Error inititializing Database", e));

// Start daemons
startDaemons(dappnodeInstaller, controller.signal);

Expand Down
2 changes: 1 addition & 1 deletion packages/dappmanager/src/initializeDb.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ function returnNullIfError(
* - Get network status variables
* - Trigger a dyndns loop
*/
export default async function initializeDb(): Promise<void> {
export async function initializeDb(): Promise<void> {
/**
* ipfsClientTarget
*/
Expand Down

0 comments on commit 7bf8e6f

Please sign in to comment.