This commit is contained in:
syuilo 2018-04-05 01:24:01 +09:00
parent eb304cb5fb
commit b6b9875205
2 changed files with 6 additions and 24 deletions

View File

@ -1,11 +1,11 @@
import * as kue from 'kue';
import { verifySignature } from 'http-signature';
import parseAcct from '../../acct/parse';
import User, { IRemoteUser } from '../../models/user';
import act from '../../remote/activitypub/act';
import resolvePerson from '../../remote/activitypub/resolve-person';
import Resolver from '../../remote/activitypub/resolver';
import parseAcct from '../../../acct/parse';
import User, { IRemoteUser } from '../../../models/user';
import act from '../../../remote/activitypub/act';
import resolvePerson from '../../../remote/activitypub/resolve-person';
import Resolver from '../../../remote/activitypub/resolver';
// ユーザーのinboxにアクティビティが届いた時の処理
export default async (job: kue.Job, done): Promise<void> => {
@ -47,7 +47,7 @@ export default async (job: kue.Job, done): Promise<void> => {
// アクティビティを処理
try {
await act(new Resolver(), user, activity);
await act(user, activity);
done();
} catch (e) {
done(e);

View File

@ -1,18 +0,0 @@
import queue from '../queue';
import db from './db';
import http from './http';
export default () => {
queue.process('db', db);
/*
256 is the default concurrency limit of Mozilla Firefox and Google
Chromium.
a8af215e691f3a2205a3758d2d96e9d328e100ff - chromium/src.git - Git at Google
https://chromium.googlesource.com/chromium/src.git/+/a8af215e691f3a2205a3758d2d96e9d328e100ff
Network.http.max-connections - MozillaZine Knowledge Base
http://kb.mozillazine.org/Network.http.max-connections
*/
queue.process('http', 256, http);
};