Retry HTTP requests

This commit is contained in:
Akihiko Odaki
2018-04-04 22:45:55 +09:00
parent 86b1345c17
commit d7c13b975f
24 changed files with 145 additions and 93 deletions

View File

@ -3,7 +3,7 @@ import * as express from 'express';
//const crypto = require('crypto');
import User from '../../../models/user';
import config from '../../../config';
import queue from '../../../queue';
import { createHttp } from '../../../queue';
module.exports = async (app: express.Application) => {
if (config.github_bot == null) return;
@ -42,7 +42,7 @@ module.exports = async (app: express.Application) => {
const commit = event.commit;
const parent = commit.parents[0];
queue.create('http', {
createHttp({
type: 'gitHubFailureReport',
userId: bot._id,
parentUrl: parent.url,