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)
|
||||
})
|
||||
}, app.getPath("userData"), app.getVersion(), env.name)
|
||||
}, app.getPath("userData"), app.getVersion(), env.name, sphinx)
|
||||
|
||||
// load page only after init app
|
||||
spider.initialized.then(() => {
|
||||
|
@ -61,7 +61,7 @@ const start = async () =>
|
||||
dbPatcher(() => {
|
||||
spider = new spiderCall((...data) => io.sockets.emit(...data), (message, callback) => {
|
||||
socketMessages[message] = callback
|
||||
}, path.resolve(packageJson.serverDataDirectory), packageJson.version, 'production')
|
||||
}, path.resolve(packageJson.serverDataDirectory), packageJson.version, 'production', sphinx)
|
||||
}, null, sphinx)
|
||||
}, path.resolve(packageJson.serverDataDirectory), () => {}))
|
||||
}
|
||||
|
@ -264,6 +264,12 @@ module.exports = async (callback, dataDirectory, onClose, params = {}) => {
|
||||
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'))
|
||||
{
|
||||
logT('sphinx', 'encoding rewrite failed, forcing restart of application to fix that problem')
|
||||
|
@ -39,7 +39,7 @@ const mime = require('mime');
|
||||
//server.listen(config.httpPort);
|
||||
//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 () =>
|
||||
{
|
||||
@ -135,6 +135,8 @@ module.exports = function (send, recive, dataDirectory, version, env)
|
||||
p2p.info.filesSize = 0;
|
||||
}
|
||||
|
||||
p2p.info.manticoreVersion = manticoreVersion;
|
||||
|
||||
if(filesInfo && filesInfo[0])
|
||||
{
|
||||
filesInfo = filesInfo[0]
|
||||
|
Loading…
Reference in New Issue
Block a user