1
This commit is contained in:
parent
f4a5b444c2
commit
69717bc402
@ -6,7 +6,7 @@ const log = require('j7/log');
|
|||||||
const metaClassList = [];
|
const metaClassList = [];
|
||||||
const metaClasses = {};
|
const metaClasses = {};
|
||||||
const web3ConfHash = {};
|
const web3ConfHash = {};
|
||||||
let web3BcSpiderConf = null;
|
let web3DbSpiderConf = null;
|
||||||
let configDir = './config/';
|
let configDir = './config/';
|
||||||
|
|
||||||
function registerMetaClass(fileName, primKey, wrapClass) {
|
function registerMetaClass(fileName, primKey, wrapClass) {
|
||||||
@ -99,9 +99,9 @@ async function init() {
|
|||||||
'',
|
'',
|
||||||
'BcNftDb'
|
'BcNftDb'
|
||||||
);
|
);
|
||||||
registerMetaClass(configDir + 'web3bcspider.cluster.json',
|
registerMetaClass(configDir + 'web3dbspider.cluster.json',
|
||||||
'',
|
'',
|
||||||
'Web3BcSpider'
|
'Web3DbSpider'
|
||||||
);
|
);
|
||||||
load();
|
load();
|
||||||
{
|
{
|
||||||
@ -111,9 +111,9 @@ async function init() {
|
|||||||
traverseMetaList('BcNftDb', (dbConf, idx) => {
|
traverseMetaList('BcNftDb', (dbConf, idx) => {
|
||||||
app.registerDb('BcNftDb' + idx, dbConf);
|
app.registerDb('BcNftDb' + idx, dbConf);
|
||||||
});
|
});
|
||||||
traverseMetaList('Web3BcSpider', (item, idx) => {
|
traverseMetaList('Web3DbSpider', (item, idx) => {
|
||||||
if (item['instance_id'] == app.getInstanceId()) {
|
if (item['instance_id'] == app.getInstanceId()) {
|
||||||
web3BcSpiderConf = item;
|
web3DbSpiderConf = item;
|
||||||
item['nets'].forEach((net) => {
|
item['nets'].forEach((net) => {
|
||||||
const netId = net['net_id'];
|
const netId = net['net_id'];
|
||||||
const netDir = configDir + 'nets/' + netId + '/';
|
const netDir = configDir + 'nets/' + netId + '/';
|
||||||
@ -187,8 +187,8 @@ function getWeb3Conf(netId) {
|
|||||||
return conf ? conf['Web3'] : null;
|
return conf ? conf['Web3'] : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
function getWeb3BcSpiderConf() {
|
function getWeb3DbSpiderConf() {
|
||||||
return web3BcSpiderConf;
|
return web3DbSpiderConf;
|
||||||
}
|
}
|
||||||
|
|
||||||
function getContractsConf(netId) {
|
function getContractsConf(netId) {
|
||||||
@ -217,7 +217,7 @@ exports.traverseMetaList = traverseMetaList;
|
|||||||
exports.callMetaStatic = callMetaStatic;
|
exports.callMetaStatic = callMetaStatic;
|
||||||
|
|
||||||
exports.getWeb3Conf = getWeb3Conf;
|
exports.getWeb3Conf = getWeb3Conf;
|
||||||
exports.getWeb3BcSpiderConf = getWeb3BcSpiderConf;
|
exports.getWeb3DbSpiderConf = getWeb3DbSpiderConf;
|
||||||
exports.getContractsConf = getContractsConf;
|
exports.getContractsConf = getContractsConf;
|
||||||
exports.getNetList = getNetList;
|
exports.getNetList = getNetList;
|
||||||
exports.getNetDir = getNetDir;
|
exports.getNetDir = getNetDir;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user