@sentio/sdk 1.16.2 → 1.16.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/processor-runner.js
CHANGED
|
@@ -33,7 +33,10 @@ const fullPath = path_1.default.resolve(options['chains-config']);
|
|
|
33
33
|
const chainsConfig = fs_extra_1.default.readJsonSync(fullPath);
|
|
34
34
|
(0, provider_1.setProvider)(chainsConfig, options.concurrency, options['use-chainserver']);
|
|
35
35
|
console.log('Start Server', options);
|
|
36
|
-
const server = (0, nice_grpc_1.createServer)(
|
|
36
|
+
const server = (0, nice_grpc_1.createServer)({
|
|
37
|
+
'grpc.max_send_message_length': 64 * 1024 * 1024,
|
|
38
|
+
'grpc.max_receive_message_length': 64 * 1024 * 1024,
|
|
39
|
+
});
|
|
37
40
|
const service = new service_1.ProcessorServiceImpl(() => (0, loader_1.load)(options.target), server.shutdown);
|
|
38
41
|
server.add(processor_1.ProcessorDefinition, service);
|
|
39
42
|
server.listen('0.0.0.0:' + options.port);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"processor-runner.js","sourceRoot":"","sources":["../src/processor-runner.ts"],"names":[],"mappings":";;;;;;AAEA,0EAA+C;AAC/C,yCAAwC;AACxC,gEAAsE;AACtE,uCAAgD;AAChD,yCAAwC;AAExC,gDAAuB;AACvB,wDAAyB;AACzB,uDAAkD;AAClD,qCAA+B;AAE/B,MAAM,CAAC,UAAU,GAAG,OAAO,CAAC,GAAG,CAAC,CAAA;AAChC,MAAM,CAAC,eAAe,GAAG,IAAI,gCAAc,EAAE,CAAA;AAE7C,MAAM,iBAAiB,GAAG;IACxB,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,aAAa,EAAE,IAAI,EAAE;IACrD,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE;IAChE,EAAE,IA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AAG,CAAC,+BAAmB,EAAE,OAAO,CAAC,CAAA;AAExC,MAAM,CAAC,MAAM,CAAC,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA","sourcesContent":["#!/usr/bin/env node\n\nimport commandLineArgs from 'command-line-args'\nimport { createServer } from 'nice-grpc'\nimport { ProcessorDefinition } from './gen/processor/protos/processor'\nimport { ProcessorServiceImpl } from './service'\nimport { setProvider } from './provider'\n\nimport path from 'path'\nimport fs from 'fs-extra'\nimport { ProcessorState } from './processor-state'\nimport { load } from './loader'\n\nglobal.sentio_sdk = require('.')\nglobal.PROCESSOR_STATE = new ProcessorState()\n\nconst optionDefinitions = [\n { name: 'target', type: String, defaultOption: true },\n { name: 'port', alias: 'p', type: String, defaultValue: '4000' },\n { name: 'concurrency', type: Number, defaultValue: 4 },\n { name: 'use-chainserver', type: Boolean, defaultValue: false },\n {\n name: 'chains-config',\n alias: 'c',\n type: String,\n defaultValue: 'chains-config.json',\n },\n]\n\nconst options = commandLineArgs(optionDefinitions, { partial: true })\n\nconsole.log('loading', options.target)\n\nconst fullPath = path.resolve(options['chains-config'])\nconst chainsConfig = fs.readJsonSync(fullPath)\n\nsetProvider(chainsConfig, options.concurrency, options['use-chainserver'])\n\nconsole.log('Start Server', options)\n\nconst server = createServer({\n 'grpc.max_send_message_length': 64 * 1024 * 1024,\n 'grpc.max_receive_message_length': 64 * 1024 * 1024,\n})\n\nconst service = new ProcessorServiceImpl(() => load(options.target), server.shutdown)\nserver.add(ProcessorDefinition, service)\n\nserver.listen('0.0.0.0:' + options.port)\n"]}
|
package/package.json
CHANGED
package/src/processor-runner.ts
CHANGED
|
@@ -38,7 +38,10 @@ setProvider(chainsConfig, options.concurrency, options['use-chainserver'])
|
|
|
38
38
|
|
|
39
39
|
console.log('Start Server', options)
|
|
40
40
|
|
|
41
|
-
const server = createServer(
|
|
41
|
+
const server = createServer({
|
|
42
|
+
'grpc.max_send_message_length': 64 * 1024 * 1024,
|
|
43
|
+
'grpc.max_receive_message_length': 64 * 1024 * 1024,
|
|
44
|
+
})
|
|
42
45
|
|
|
43
46
|
const service = new ProcessorServiceImpl(() => load(options.target), server.shutdown)
|
|
44
47
|
server.add(ProcessorDefinition, service)
|