Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed create-jesque-job script #8

Merged
merged 1 commit into from
Dec 16, 2011
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ class RedisAutoWireJob {
def redisService

void perform() {
redisService.hello = "world"
redisService.worked = "true"
println "hello world"
}
Expand Down
10 changes: 2 additions & 8 deletions scripts/CreateJesqueJob.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -21,22 +21,16 @@ import org.apache.tools.ant.taskdefs.Ant
*
* @author Christian Oestreich
*/

Ant.property(environment: "env")
grailsHome = Ant.antProject.properties."env.GRAILS_HOME"


includeTargets << grailsScript("_GrailsInit")
includeTargets << grailsScript("_GrailsCreateArtifacts")

target('default': "Creates a new Jesque job") {
depends(checkVersion, parseArguments)

def suffix = "Job"
def name = argsMap["params"][0]
def suffix = name.endsWith('Job') ? '' : "Job"
def type = "JesqueJob"
promptForName(type: type)

def name = argsMap["params"][0]
createArtifact(name: name, suffix: suffix, type: type, path: "grails-app/jobs")
createUnitTest(name: name, suffix: suffix)
if(hasSpockInstalled()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class JesqueServiceInjectionSpec extends IntegrationSpec {
def queueName = 'redisAutoWireJob'
def existingProcessedCount = queueInfoDao.processedCount
def existingFailureCount = failureDao.count
redisService.hello = "world"
redisService.hello = ""

when:
jesqueService.enqueue(queueName, RedisAutoWireJob.simpleName)
Expand All @@ -38,7 +38,7 @@ class JesqueServiceInjectionSpec extends IntegrationSpec {
def queueName = 'redisAutoWireJobQueueName'
def existingProcessedCount = queueInfoDao.processedCount
def existingFailureCount = failureDao.count
redisService.hello = "world"
redisService.hello = ""

when:
jesqueService.enqueue(queueName, RedisAutoWireJob.simpleName)
Expand Down