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
No related branches found
No related tags found
No related merge requests found
Pipeline #32217 waiting for manual action
...@@ -41,6 +41,7 @@ import { ...@@ -41,6 +41,7 @@ import {
} from "../lib/dto/CertificationDTO"; } from "../lib/dto/CertificationDTO";
import { MembershipDTO } from "../lib/dto/MembershipDTO"; import { MembershipDTO } from "../lib/dto/MembershipDTO";
import { RevocationDTO, ShortRevocation } from "../lib/dto/RevocationDTO"; import { RevocationDTO, ShortRevocation } from "../lib/dto/RevocationDTO";
import { NewLogger } from "../lib/logger";
const Table = require("cli-table"); const Table = require("cli-table");
...@@ -156,6 +157,7 @@ module.exports = { ...@@ -156,6 +157,7 @@ module.exports = {
break; break;
case "wotwizard": case "wotwizard":
NewLogger().unmute();
await dumpWotWizard(server); await dumpWotWizard(server);
break; break;
......
...@@ -53,6 +53,6 @@ export async function dumpWotWizard(server: Server) { ...@@ -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_0),
Directory.GET_FILE_PATH(WotWizardConstants.DB_NAME) 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) { ...@@ -26,8 +26,12 @@ export async function addLegacyBlocks(server: Server, wwDAL: WotWizardDAL) {
return f; return f;
}); });
legacies.forEach((l) => blocksSaved.push(l)); legacies.forEach((l) => blocksSaved.push(l));
if (i % 25000 === 0) { if (i % CommonConstants.BLOCKS_IN_MEMORY_MAX === 0) {
logger.debug("Saving 25 blocks... (%s yet stored)", i); logger.debug(
"Saving %s blocks... (%s yet stored)",
CommonConstants.BLOCKS_IN_MEMORY_MAX,
i
);
await wwDAL.blockDao.insertBatch(blocksSaved); await wwDAL.blockDao.insertBatch(blocksSaved);
blocksSaved = []; blocksSaved = [];
} }
......
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