Skip to content
Snippets Groups Projects
Commit fe5958ad authored by Cédric Moreau's avatar Cédric Moreau
Browse files

Merge branch 'feature/wotwizard-1.8' into release/1.8

parents 10ca6399 2d2e3199
Branches
Tags
No related merge requests found
Pipeline #32217 waiting for manual action
......@@ -41,6 +41,7 @@ import {
} from "../lib/dto/CertificationDTO";
import { MembershipDTO } from "../lib/dto/MembershipDTO";
import { RevocationDTO, ShortRevocation } from "../lib/dto/RevocationDTO";
import { NewLogger } from "../lib/logger";
const Table = require("cli-table");
......@@ -156,6 +157,7 @@ module.exports = {
break;
case "wotwizard":
NewLogger().unmute();
await dumpWotWizard(server);
break;
......
......@@ -53,6 +53,6 @@ export async function dumpWotWizard(server: Server) {
Directory.GET_FILE_PATH(WotWizardConstants.DB_NAME_0),
Directory.GET_FILE_PATH(WotWizardConstants.DB_NAME)
);
fs.writeFileSync(updatingFile, Date.now());
fs.writeFileSync(updatingFile, String(Date.now()));
}
}
......@@ -26,8 +26,12 @@ export async function addLegacyBlocks(server: Server, wwDAL: WotWizardDAL) {
return f;
});
legacies.forEach((l) => blocksSaved.push(l));
if (i % 25000 === 0) {
logger.debug("Saving 25 blocks... (%s yet stored)", i);
if (i % CommonConstants.BLOCKS_IN_MEMORY_MAX === 0) {
logger.debug(
"Saving %s blocks... (%s yet stored)",
CommonConstants.BLOCKS_IN_MEMORY_MAX,
i
);
await wwDAL.blockDao.insertBatch(blocksSaved);
blocksSaved = [];
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment