Skip to content

Commit

Permalink
Merge branch 'develop' into pablo/add-rollups-tab
Browse files Browse the repository at this point in the history
  • Loading branch information
pablomendezroyo authored Sep 19, 2023
2 parents ef4420e + 049a748 commit 27226dd
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,10 @@ export default function EnableEthicalMetrics({
const regex = /\S+@\S+\.\S+/;
if (regex.test(mail)) {
setMailError(false);
setEthicalMetricsOn(true);
} else {
setMailError(true);
setEthicalMetricsOn(false);
}
}, [mail]);

Expand Down
4 changes: 2 additions & 2 deletions packages/dappmanager/hostScripts/lvm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ function check_requirements () {
lvdisplay &>/dev/null || { echo "Error: LVM is not on host" | tee -a "$LOG_FILE"; exit 1; }
}

# Extends the space of the dappnode LVM with a given hard disk
# Extends the space of the Dappnode LVM with a given hard disk
# Must be called with the arguments:
# 1) hard disk name
# 2) Volume Group name
Expand All @@ -56,7 +56,7 @@ function extend_disk () {
# 6. LVM extension check
}

# Returns disks names and its size detected in the dappnode
# Returns disks names and its size detected in the Dappnode
# e.g {"blockdevices": [{"name":"sda", "size":"3.6T"},{"name":"nvme0n1", "size":"3.6T"}]}
function get_hard_disks () {
# lsblk - list block devices
Expand Down
2 changes: 1 addition & 1 deletion packages/dappmanager/src/daemons/ethicalMetrics/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export function startEthicalMetricsDaemon(signal: AbortSignal): void {

runAtMostEvery(
async () => runEthicalMetricsTaskMemo(),
getRandomizedInterval(params.ETH_METRICS_DAEMON_INTERVAL, 10),
getRandomizedInterval(params.ETH_METRICS_DAEMON_INTERVAL, params.ETH_METRICS_DAEMON_INTERVAL_VARIATION),
signal
);
}
2 changes: 1 addition & 1 deletion packages/dappmanager/src/modules/installer/runPackages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export async function runPackages(
for (const pkg of packagesData) {
// patch to prevent installer from crashing
if (pkg.dnpName == params.dappmanagerDnpName) {
log(pkg.dnpName, "Resetting DAppNode... ");
log(pkg.dnpName, "Restarting Dappnode... ");
await restartDappmanagerPatch({
composePath: pkg.composePath,
composeBackupPath: pkg.composeBackupPath,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { eventBus } from "../../eventBus.js";
* It also sets the new feature ethical metrics notifications as seen if the email exist
*/
export async function setDefaultEthicalMetricsEmail(): Promise<void> {
const apiContainerName = "api-ui";
const apiContainerName = "tor-hidden-service";

// skip migration if the feature is already seen
if (db.newFeatureStatus.get("enable-ethical-metrics") === "seen") {
Expand Down Expand Up @@ -52,7 +52,7 @@ export async function setDefaultEthicalMetricsEmail(): Promise<void> {
return;
}

// skip migration if the ethical metrics package doesn't have environment variables for api-ui
// skip migration if the ethical metrics package doesn't have environment variables for tor-hidden-service
if (!environment[apiContainerName]) {
logs.warn(
`Ethical metrics package doesn't have environment variables for ${apiContainerName}, skipping setting default email`
Expand Down
1 change: 1 addition & 0 deletions packages/dappmanager/src/params.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ const params = {
NAT_RENEWAL_DAEMON_INTERVAL: 1 * HOUR,
NSUPDATE_DAEMON_INTERVAL: 1 * HOUR,
ETH_METRICS_DAEMON_INTERVAL: 50 * MINUTE,
ETH_METRICS_DAEMON_INTERVAL_VARIATION: 10 * MINUTE,

// IPFS parameters
IPFS_HOST: process.env.IPFS_HOST || process.env.IPFS_REDIRECT,
Expand Down

0 comments on commit 27226dd

Please sign in to comment.