summaryrefslogtreecommitdiff
path: root/src/queue
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2018-04-07 15:45:03 +0900
committersyuilo <syuilotan@yahoo.co.jp>2018-04-07 15:45:03 +0900
commitc77013ab3ec748ccc441c497cd04231398194cc6 (patch)
tree13cc50f4926e6646b58d886d0263ac3b6cd7de26 /src/queue
parent各種カウントを復活させたりなど (diff)
downloadsharkey-c77013ab3ec748ccc441c497cd04231398194cc6.tar.gz
sharkey-c77013ab3ec748ccc441c497cd04231398194cc6.tar.bz2
sharkey-c77013ab3ec748ccc441c497cd04231398194cc6.zip
oops
Diffstat (limited to 'src/queue')
-rw-r--r--src/queue/processors/http/index.ts25
1 files changed, 14 insertions, 11 deletions
diff --git a/src/queue/processors/http/index.ts b/src/queue/processors/http/index.ts
index 0ea79305c6..3dc2595374 100644
--- a/src/queue/processors/http/index.ts
+++ b/src/queue/processors/http/index.ts
@@ -1,17 +1,20 @@
-import deliverPost from './deliver-post';
-import follow from './follow';
-import performActivityPub from './perform-activitypub';
+import deliver from './deliver';
import processInbox from './process-inbox';
import reportGitHubFailure from './report-github-failure';
-import unfollow from './unfollow';
const handlers = {
- deliverPost,
- follow,
- performActivityPub,
- processInbox,
- reportGitHubFailure,
- unfollow
+ deliver,
+ processInbox,
+ reportGitHubFailure
};
-export default (job, done) => handlers[job.data.type](job, done);
+export default (job, done) => {
+ const handler = handlers[job.data.type];
+
+ if (handler) {
+ handler(job, done);
+ } else {
+ console.error(`Unknown job: ${job.data.type}`);
+ done();
+ }
+};