From 8a57f490ceccb6e1e4099cc945fe80fd03906d52 Mon Sep 17 00:00:00 2001 From: syuilo Date: Fri, 27 Jul 2018 18:40:38 +0900 Subject: [PATCH] =?UTF-8?q?=E3=83=90=E3=82=AE=E3=83=BC=E3=81=AA=E3=81=AE?= =?UTF-8?q?=E3=81=A7=E3=82=B8=E3=83=A7=E3=83=96=E3=82=AD=E3=83=A5=E3=83=BC?= =?UTF-8?q?=E7=84=A1=E5=8A=B9=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/index.ts | 3 --- src/queue/index.ts | 26 +------------------------- 2 files changed, 1 insertion(+), 28 deletions(-) diff --git a/src/index.ts b/src/index.ts index 7545c82c7..9c16c4d22 100644 --- a/src/index.ts +++ b/src/index.ts @@ -79,9 +79,6 @@ async function workerMain() { // start server await require('./server').default(); - // start processor - require('./queue').default(); - // Send a 'ready' message to parent process process.send('ready'); } diff --git a/src/queue/index.ts b/src/queue/index.ts index 775e5f199..e404f6fc9 100644 --- a/src/queue/index.ts +++ b/src/queue/index.ts @@ -1,28 +1,8 @@ -import * as Queue from 'bee-queue'; - -import config from '../config'; import http from './processors/http'; import { ILocalUser } from '../models/user'; -const queue = new Queue('misskey', { - redis: { - port: config.redis.port, - host: config.redis.host, - password: config.redis.pass - }, - - removeOnSuccess: true, - removeOnFailure: true, - getEvents: false, - sendEvents: false, - storeJobs: false -}); - export function createHttpJob(data: any) { - return queue.createJob(data) - //.retries(4) - //.backoff('exponential', 16384) // 16s - .save(); + return http(data, () => {}); } export function deliver(user: ILocalUser, content: any, to: any) { @@ -33,7 +13,3 @@ export function deliver(user: ILocalUser, content: any, to: any) { to }); } - -export default function() { - queue.process(128, http); -}