mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-14 23:53:08 +02:00
oops
This commit is contained in:
parent
2259747072
commit
c77013ab3e
1 changed files with 14 additions and 11 deletions
|
@ -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();
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue