mirror of
https://github.com/misskey-dev/misskey.git
synced 2024-12-27 22:39:33 +09:00
21 lines
395 B
TypeScript
21 lines
395 B
TypeScript
import deliver from './deliver';
|
|
import processInbox from './process-inbox';
|
|
import reportGitHubFailure from './report-github-failure';
|
|
|
|
const handlers = {
|
|
deliver,
|
|
processInbox,
|
|
reportGitHubFailure
|
|
};
|
|
|
|
export default (job, done) => {
|
|
const handler = handlers[job.data.type];
|
|
|
|
if (handler) {
|
|
handler(job, done);
|
|
} else {
|
|
console.error(`Unknown job: ${job.data.type}`);
|
|
done();
|
|
}
|
|
};
|