Skip to content
Snippets Groups Projects
Commit 4cbbb829 authored by poka's avatar poka
Browse files

fix: increase node memory

parent 69100f09
No related branches found
No related tags found
2 merge requests!21Refac v1 history,!20Add certifications date
......@@ -102,12 +102,17 @@
},
"process": {
"description": "Load .env and start the squid processor",
"cmd": ["node", "--require=dotenv/config", "lib/main.js"]
"cmd": [
"node",
"--require=dotenv/config",
"-max-old-space-size=4096",
"lib/main.js"
]
},
"process:prod": {
"description": "Start the squid processor",
"deps": ["migration:apply"],
"cmd": ["node", "lib/main.js"],
"cmd": ["node", "-max-old-space-size=4096", "lib/main.js"],
"hidden": true
},
"check-updates": {
......
{
"name": "squid",
"version": "0.2.1",
"version": "0.2.2",
"private": true,
"engines": {
"node": ">=20"
......
......@@ -102,9 +102,11 @@ export class BlocksV1Reader {
}
private updateCert(cert: Cert, blockV1: BlockParsed, eventV1: Event): void {
let isCreation = false;
if (cert.createdOn === 0) {
cert.createdOn = blockV1.height;
cert.createdIn = eventV1;
isCreation = true;
}
cert.updatedOn = blockV1.height;
cert.updatedIn = eventV1;
......@@ -112,7 +114,7 @@ export class BlocksV1Reader {
id: `${cert.id}-${blockV1.height}`,
cert,
blockNumber: blockV1.height,
eventType: EventType.Renewal,
eventType: isCreation ? EventType.Creation : EventType.Renewal,
event: eventV1,
});
this.certsEvents.push(certEvent);
......
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