summaryrefslogtreecommitdiff
path: root/src/queue
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2018-04-17 08:06:51 +0900
committersyuilo <syuilotan@yahoo.co.jp>2018-04-17 08:06:51 +0900
commit06535a37b5682b38e4a1a076b545e7e058f37516 (patch)
tree1d75716857335eadef7848e5233ba65fe431b88c /src/queue
parentFix (diff)
downloadsharkey-06535a37b5682b38e4a1a076b545e7e058f37516.tar.gz
sharkey-06535a37b5682b38e4a1a076b545e7e058f37516.tar.bz2
sharkey-06535a37b5682b38e4a1a076b545e7e058f37516.zip
キューのメモリ使用量を削減
Diffstat (limited to 'src/queue')
-rw-r--r--src/queue/index.ts7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/queue/index.ts b/src/queue/index.ts
index 94efb3634a..88e475dd5d 100644
--- a/src/queue/index.ts
+++ b/src/queue/index.ts
@@ -14,7 +14,7 @@ const queue = createQueue({
export function createHttp(data) {
return queue
.create('http', data)
- .attempts(16)
+ .attempts(8)
.backoff({ delay: 16384, type: 'exponential' });
}
@@ -24,7 +24,7 @@ export function deliver(user, content, to) {
user,
content,
to
- }).save();
+ }).removeOnComplete(true).save();
}
export default function() {
@@ -36,5 +36,6 @@ export default function() {
Network.http.max-connections - MozillaZine Knowledge Base
http://kb.mozillazine.org/Network.http.max-connections
*/
- queue.process('http', 256, http);
+ //queue.process('http', 256, http);
+ queue.process('http', 128, http);
}