eslint
This commit is contained in:
parent
34cdc7fb09
commit
ce618f4408
@ -11,6 +11,7 @@
|
||||
"react"
|
||||
],
|
||||
"rules": {
|
||||
"indent": ["error", "tab"]
|
||||
"indent": ["error", "tab"],
|
||||
"space-infix-ops": ["error", {"int32Hint": false}]
|
||||
}
|
||||
}
|
@ -58,13 +58,13 @@ class PagesPie extends Component {
|
||||
{
|
||||
this.pie.map(({Page, params}, index) => {
|
||||
let focus = false;
|
||||
if (index === this.pie.length-1) {
|
||||
if (index === this.pie.length - 1) {
|
||||
focus = true;
|
||||
}
|
||||
return (
|
||||
<Page
|
||||
focused={focus}
|
||||
closeHandler={() => { index> 0 ? this.close() : null}}
|
||||
closeHandler={() => { index > 0 ? this.close() : null}}
|
||||
index={index}
|
||||
key={index}
|
||||
ref={index}
|
||||
|
@ -33,7 +33,7 @@ function generateTid() {
|
||||
class Spider extends Emiter {
|
||||
constructor(client) {
|
||||
super()
|
||||
const options = arguments.length? arguments[0]: {}
|
||||
const options = arguments.length ? arguments[0] : {}
|
||||
this.table = new Table(options.tableCaption || 1000)
|
||||
this.bootstraps = options.bootstraps || bootstraps
|
||||
this.token = new Token()
|
||||
|
@ -3,7 +3,7 @@
|
||||
module.exports = class {
|
||||
constructor() {
|
||||
this.generate()
|
||||
const it = setInterval(() => this.generate(), 60000*15)
|
||||
const it = setInterval(() => this.generate(), 60000 * 15)
|
||||
it.unref()
|
||||
}
|
||||
|
||||
@ -12,6 +12,6 @@ module.exports = class {
|
||||
}
|
||||
|
||||
generate() {
|
||||
this.token = new Buffer([parseInt(Math.random()*200), parseInt(Math.random()*200)])
|
||||
this.token = new Buffer([parseInt(Math.random() * 200), parseInt(Math.random() * 200)])
|
||||
}
|
||||
}
|
@ -24,7 +24,7 @@ let connectTracker = function(connection) {
|
||||
debug('start screape connection');
|
||||
let buffer = new Buffer(16);
|
||||
|
||||
const transactionId = Math.floor((Math.random()*100000)+1);
|
||||
const transactionId = Math.floor((Math.random() * 100000) + 1);
|
||||
|
||||
buffer.fill(0);
|
||||
|
||||
|
@ -209,7 +209,7 @@ module.exports = async (callback, mainWindow, sphinxApp) => {
|
||||
if(torrentsArray.length >= 20000)
|
||||
{
|
||||
fs.writeFileSync(`${sphinxApp.directoryPath}/torrents.patch.${patch++}`, JSON.stringify(torrentsArray, null, 4), 'utf8');
|
||||
logT('patcher', 'write torrents dump', `${sphinxApp.directoryPath}/torrents.patch.${patch-1}`)
|
||||
logT('patcher', 'write torrents dump', `${sphinxApp.directoryPath}/torrents.patch.${patch - 1}`)
|
||||
torrentsArray = []
|
||||
}
|
||||
})
|
||||
|
@ -158,8 +158,8 @@ module.exports = (callback, dataDirectory, onClose) => {
|
||||
}
|
||||
|
||||
// check external sphinx instance for using
|
||||
const sphinxPid=`${sphinxConfigDirectory}/searchd.pid`
|
||||
const isSphinxExternal=fs.existsSync(sphinxPid) && isRunning(parseInt(fs.readFileSync(sphinxPid)))
|
||||
const sphinxPid = `${sphinxConfigDirectory}/searchd.pid`
|
||||
const isSphinxExternal = fs.existsSync(sphinxPid) && isRunning(parseInt(fs.readFileSync(sphinxPid)))
|
||||
if(isSphinxExternal)
|
||||
logT('sphinx', `founded running sphinx instance in ${sphinxPid}, using it`)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user