mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 17:38:19 +08:00
多worker共享事件(不稳定
This commit is contained in:
1 parent
d59710ddf1
commit
dd5a212422
9 files changed
+113
-20
No files matched your search
@@ -1,10 +1,15 @@
|
||||
const fs = require('fs');
|
||||
const cluster = require('cluster');
|
||||
const path = require('path');
|
||||
const superagent = require('superagent');
|
||||
const proxy = require('superagent-proxy');
|
||||
|
||||
proxy(superagent);
|
||||
|
||||
if (!cluster.worker) {
|
||||
cluster.worker = { id: 0 };
|
||||
}
|
||||
|
||||
const dict = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890';
|
||||
|
||||
String.random = function random(digit = 32) {
|
||||
|
||||
Reference in new issue
Block a user