Skip to content

Commit

Permalink
Merge branch 'develop' into 3alpha/add-header-jsonrpcprovider
Browse files Browse the repository at this point in the history
  • Loading branch information
pablomendezroyo authored Jul 23, 2024
2 parents 9e8f42f + 2219e99 commit fc0ea4e
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions packages/daemons/src/ethicalMetrics/checkEthicalMetricsStatus.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,11 @@ import { InstalledPackageData } from "@dappnode/types";

/**
* Make sure that on Ethical metrics enabled and existing email,
* the packages exporter, DMS and Ethical metrics are installed and running
* the packages DMS and Ethical metrics are installed and running
*/
export async function checkEthicalMetricsStatus(
dappnodeInstaller: DappnodeInstaller
): Promise<void> {
const exporterDnpName = "dappnode-exporter.dnp.dappnode.eth";
const dmsDnpName = "dms.dnp.dappnode.eth";

try {
Expand All @@ -22,9 +21,8 @@ export async function checkEthicalMetricsStatus(
if (enabled) {
if (!mail && !tgChannelId) throw Error("mail or tgChannelId is required");

// First check for Ethical metrics, then for DMS and last for Exporter
// First check for Ethical metrics, then for DMS
// Ethical Metrics package has DMS as dependency, so it will be installed automatically
// DMS package has Exporter as dependency, so it will be installed automatically

// Check ethical metrics pkg
const ethicalMetricsPkg = await listPackageNoThrow({
Expand All @@ -42,14 +40,6 @@ export async function checkEthicalMetricsStatus(
await packageInstall(dappnodeInstaller, { name: dmsDnpName });
else ensureAllContainersRunning(dmsPkg);

// check exporter pkg
const exporterPkg = await listPackageNoThrow({
dnpName: exporterDnpName,
});
if (!exporterPkg)
await packageInstall(dappnodeInstaller, { name: exporterDnpName });
else ensureAllContainersRunning(exporterPkg);

// Register instance
await register({ mail, tgChannelId });
}
Expand Down

0 comments on commit fc0ea4e

Please sign in to comment.