 	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) ->
+		searchJobs.enqueue thisJob = (cred) ->
 			winston.info "Fetching page #{page} of Top Repositories with stars <= #{stars}"
 			githubApi
 				url: "/search/repositories"

fetchRepoCommits = (repo, date = "", callback) ->
	logDate = if date is "" then "forever" else date
	winston.info "Adding API Job to fetch commits for repo #{repo.fullName} since #{logDate}"
	apiJobs.enqueue (cred) ->
		winston.info "Fetching commits for repo #{repo.fullName} since #{logDate}"
		githubApi opts =
			url: "/repos/#{repo.fullName}/commits"


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}"
