Last active
December 15, 2015 04:59
-
-
Save jefferyf/5205947 to your computer and use it in GitHub Desktop.
Get info re mt hit
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.reachlocal.grails.sales.Advertiser | |
import com.reachlocal.grails.sales.AdvertiserConnection | |
import com.reachlocal.grails.amt.* | |
import com.reachlocal.grails.question.* | |
String comment = "****************************************************" | |
def advertisers = Advertiser.findAllByLastAnalyzedIsNotNull([max: 20, sort: "id", order: "desc", offset: 0]) | |
advertisers.each{advertiser-> | |
println "${comment}\n* HITs for Advertiser: ${advertiser.name} \n${comment}" | |
def acs = AdvertiserConnection.findAllByAdvertiser(advertiser)*.ident()*.toString() | |
def hits = AnswerMechanicalTurkLink.findAllByRefIdInList(acs)*.hit | |
hits.each{hit-> | |
println "Hit ID: ${hit.hitId} | Status: ${hit.hitStatus} | Worker Id: ${hit.workerId}" | |
} | |
println "\n" | |
} | |
return |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment