 			, (err, response, body) ->
 				if err?
 					winston.error "Error at getAndInsertTopRepositories on page #{page} with stars <= #{stars}", err, response, body
-					return callback()
+					return searchJobs.enqueue thisJob
 				if response.statusCode >= 400
 					winston.error "Bad response at getAndInsertTopRepositories on page #{page} with stars <= #{stars}", body
-					return callback()
+					return searchJobs.enqueue thisJob
 				items = JSON.parse(body)?.items
 				unless items?
 					winston.error "Field items does not exist at getAndInsertTopRepositories on page #{page} with stars <= #{stars}"
-					return callback()
+					return searchJobs.enqueue thisJob
 				async.eachLimit items, 10, (item, callback) ->
 					minStars = Math.min minStars, item.stargazers_count
 					db.Repository.findOneAndUpdate {fullName: item.full_name},

	minStars = Infinity
	async.eachSeries [1 .. 10], (page, callback) ->
		winston.info "Adding Search Job to fetch page #{page} of Top Repositories with stars <= #{stars}"
		searchJobs.enqueue (cred) ->
			winston.info "Fetching page #{page} of Top Repositories with stars <= #{stars}"
			githubApi
				url: "/search/repositories"


fetchCommit = (repo, commit, callback) ->
	winston.info "Adding API Job to fetch commit #{commit.sha}"
	apiJobs.enqueue thisJob = (cred) ->
		winston.info "Fetching commit #{commit.sha}"
		githubApi
			url: "/repos/#{repo.fullName}/commits/#{commit.sha}"
