Size: a a a

2017 September 14

PT

Pavel Tomsha in Dev Chat
Could you show all your file with that code? Use pastebin.com
источник

VT

Vincent Tan Boon Kheng in Dev Chat
I'm not with my machine now will do it once I have access
источник

VT

Vincent Tan Boon Kheng in Dev Chat
https://pastebin.com/XgESyGK7
So when i run this code.... it will print out "initializing value" 2-4 times
источник

ПМ

Правый Медвежонок🧚 in Dev Chat
cause you can't set 0 workers
источник

ПМ

Правый Медвежонок🧚 in Dev Chat
and if you set 0 lib enable all workers
источник

PT

Pavel Tomsha in Dev Chat
you can wrap your init code with:
const cluster = require('cluster');
if (cluster.isMaster) {
...
}
источник

ПМ

Правый Медвежонок🧚 in Dev Chat
+
источник

ПМ

Правый Медвежонок🧚 in Dev Chat
Pavel Tomsha
you can wrap your init code with:
const cluster = require('cluster');
if (cluster.isMaster) {
...
}
tg.isMaster
источник

VT

Vincent Tan Boon Kheng in Dev Chat
Okay! Let me try
источник

1

1C-Bitrix in Dev Chat
You can't set workers 0
источник

1

1C-Bitrix in Dev Chat
Only 1
источник

VT

Vincent Tan Boon Kheng in Dev Chat
it happens when i set to 1
источник

VT

Vincent Tan Boon Kheng in Dev Chat
too
источник

1

1C-Bitrix in Dev Chat
And then you have to check is it master or worker instance
источник

1

1C-Bitrix in Dev Chat
Pavel Tomsha
you can wrap your init code with:
const cluster = require('cluster');
if (cluster.isMaster) {
...
}
Like that
источник

1

1C-Bitrix in Dev Chat
Fuck
источник

1

1C-Bitrix in Dev Chat
Read about clustering in node js
источник

1

1C-Bitrix in Dev Chat
Mathafaka
источник

1

1C-Bitrix in Dev Chat
Vincent Tan Boon Kheng
https://pastebin.com/XgESyGK7
So when i run this code.... it will print out "initializing value" 2-4 times
OMG you don't know basic node js things and you open issues
источник

1

1C-Bitrix in Dev Chat
You just can't read the docs
источник