Skip to content

Commit

Permalink
Merge pull request #8 from ctoestreich/master
Browse files Browse the repository at this point in the history
Fixed create-jesque-job script
  • Loading branch information
Michael Cameron committed Dec 16, 2011
2 parents 601166c + de55e6c commit 15f6f24
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 10 deletions.
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

0 comments on commit 15f6f24

Please sign in to comment.