wip
This commit is contained in:
parent
06347cd71e
commit
7403f38fb4
9 changed files with 50 additions and 27 deletions
|
|
@ -3,9 +3,17 @@ import processInbox from './process-inbox';
|
|||
import reportGitHubFailure from './report-github-failure';
|
||||
|
||||
const handlers = {
|
||||
deliver,
|
||||
processInbox,
|
||||
reportGitHubFailure,
|
||||
deliver,
|
||||
processInbox,
|
||||
reportGitHubFailure
|
||||
};
|
||||
|
||||
export default (job, done) => handlers[job.data.type](job).then(() => done(), done);
|
||||
export default (job, done) => {
|
||||
const handler = handlers[job.data.type];
|
||||
|
||||
if (handler) {
|
||||
handler(job).then(() => done(), done);
|
||||
} else {
|
||||
console.warn(`Unknown job: ${job.data.type}`);
|
||||
}
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue