feat(p2p): publish manticore info
This commit is contained in:
parent
8e7bb74f6b
commit
9d17fd28d1
@ -300,7 +300,7 @@ app.on("ready", async () => {
|
|||||||
}
|
}
|
||||||
callback.apply(null, arg)
|
callback.apply(null, arg)
|
||||||
})
|
})
|
||||||
}, app.getPath("userData"), app.getVersion(), env.name)
|
}, app.getPath("userData"), app.getVersion(), env.name, sphinx)
|
||||||
|
|
||||||
// load page only after init app
|
// load page only after init app
|
||||||
spider.initialized.then(() => {
|
spider.initialized.then(() => {
|
||||||
|
@ -61,7 +61,7 @@ const start = async () =>
|
|||||||
dbPatcher(() => {
|
dbPatcher(() => {
|
||||||
spider = new spiderCall((...data) => io.sockets.emit(...data), (message, callback) => {
|
spider = new spiderCall((...data) => io.sockets.emit(...data), (message, callback) => {
|
||||||
socketMessages[message] = callback
|
socketMessages[message] = callback
|
||||||
}, path.resolve(packageJson.serverDataDirectory), packageJson.version, 'production')
|
}, path.resolve(packageJson.serverDataDirectory), packageJson.version, 'production', sphinx)
|
||||||
}, null, sphinx)
|
}, null, sphinx)
|
||||||
}, path.resolve(packageJson.serverDataDirectory), () => {}))
|
}, path.resolve(packageJson.serverDataDirectory), () => {}))
|
||||||
}
|
}
|
||||||
|
@ -263,6 +263,12 @@ module.exports = async (callback, dataDirectory, onClose, params = {}) => {
|
|||||||
{
|
{
|
||||||
needConvertation = true;
|
needConvertation = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let manticoreVersion;
|
||||||
|
if (!sphinx.version && (manticoreVersion = /Manticore ([0-9\.]+)/.exec(data))) {
|
||||||
|
sphinx.version = manticoreVersion[1];
|
||||||
|
logT('sphinx', 'sphinx version', sphinx.version);
|
||||||
|
}
|
||||||
|
|
||||||
if(windowsEncodingFix && data.includes('failed to parse config file'))
|
if(windowsEncodingFix && data.includes('failed to parse config file'))
|
||||||
{
|
{
|
||||||
|
@ -39,7 +39,7 @@ const mime = require('mime');
|
|||||||
//server.listen(config.httpPort);
|
//server.listen(config.httpPort);
|
||||||
//console.log('Listening web server on', config.httpPort, 'port')
|
//console.log('Listening web server on', config.httpPort, 'port')
|
||||||
|
|
||||||
module.exports = function (send, recive, dataDirectory, version, env)
|
module.exports = function (send, recive, dataDirectory, version, env, {version: manticoreVersion})
|
||||||
{
|
{
|
||||||
this.initialized = (async () =>
|
this.initialized = (async () =>
|
||||||
{
|
{
|
||||||
@ -135,6 +135,8 @@ module.exports = function (send, recive, dataDirectory, version, env)
|
|||||||
p2p.info.filesSize = 0;
|
p2p.info.filesSize = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
p2p.info.manticoreVersion = manticoreVersion;
|
||||||
|
|
||||||
if(filesInfo && filesInfo[0])
|
if(filesInfo && filesInfo[0])
|
||||||
{
|
{
|
||||||
filesInfo = filesInfo[0]
|
filesInfo = filesInfo[0]
|
||||||
|
Loading…
Reference in New Issue
Block a user