mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-10-29 18:00:23 +00:00
farmhash for worker-id, and prefix fix on firefox
This commit is contained in:
1910
package-lock.json
generated
1910
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -38,6 +38,7 @@
|
||||
"express-recaptcha": "^3.0.1",
|
||||
"express-session": "^1.15.6",
|
||||
"express-sessions": "^1.0.6",
|
||||
"farmhash": "^2.1.0",
|
||||
"gulp": "^3.9.1",
|
||||
"gulp-concat": "^2.6.1",
|
||||
"gulp-uglifyjs": "^0.6.2",
|
||||
|
||||
@@ -4,6 +4,7 @@ path = require('path'),
|
||||
//publicPath = path.join(__dirname, 'public'),
|
||||
http = require('http'),
|
||||
port = 8080,
|
||||
farmhash = require('farmhash'),
|
||||
num_processes = require('os').cpus().length;
|
||||
|
||||
publicPath = path.join(__dirname, 'public');
|
||||
@@ -46,13 +47,7 @@ function startClustered(redis_enabled) {
|
||||
}
|
||||
|
||||
var worker_index = function(ip, len) {
|
||||
var s = '';
|
||||
for (var i = 0, _len = ip.length; i < _len; i++) {
|
||||
if (!isNaN(ip[i])) {
|
||||
s += ip[i];
|
||||
}
|
||||
}
|
||||
return Number(s) % len;
|
||||
return farmhash.fingerprint32(ip) % len;
|
||||
};
|
||||
|
||||
var server = net.createServer({ pauseOnConnect: true }, function(connection, a) {
|
||||
|
||||
@@ -1365,10 +1365,15 @@ margin:-1px;
|
||||
margin-left: 0px !important;
|
||||
}
|
||||
|
||||
.input-field .prefix
|
||||
{
|
||||
position: relative !important;
|
||||
}
|
||||
|
||||
.channel-finder .input-field .prefix{
|
||||
color:white;
|
||||
font-size:17px;
|
||||
left: 5px;
|
||||
left: 47px;
|
||||
top: -9px;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user