Skip to content
This repository has been archived by the owner on Jan 18, 2022. It is now read-only.

Commit

Permalink
#80 Fix onStartup signature
Browse files Browse the repository at this point in the history
Quartz 2.0.13
Flush on send
  • Loading branch information
kefirfromperm committed Feb 21, 2018
1 parent 8e7db0f commit f1063ca
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 8 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ Installation
To install just add the plugin to the plugins block of `build.gradle`. For Grails 3.3.x

```groovy
compile "org.grails.plugins:asynchronous-mail:2.0.1"
compile "org.grails.plugins:asynchronous-mail:2.0.2"
```

For Grails 3.2.11 and earlier

```groovy
compile "org.grails.plugins:asynchronous-mail:2.0.1-3.2.x"
compile "org.grails.plugins:asynchronous-mail:2.0.2-3.2.x"
```

Configuration
Expand Down
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ buildscript {
}
}

version "2.0.1"
version "2.0.2"
group "org.grails.plugins"

apply plugin: 'idea'
Expand Down Expand Up @@ -49,7 +49,7 @@ dependencies {
testCompile "com.h2database:h2:1.4.196"

compile "org.grails.plugins:mail:2.0.0"
compile "org.grails.plugins:quartz:2.0.12"
compile "org.grails.plugins:quartz:2.0.13"
}

assets {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class AsynchronousMailService {
savedMessage = asynchronousMailPersistenceService.save(message, true, true)
}
} else {
savedMessage = asynchronousMailPersistenceService.save(message, immediately, true)
savedMessage = asynchronousMailPersistenceService.save(message, true, true)
}

if (!savedMessage) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ class AsynchronousMailPersistenceServiceSpec extends Specification {

then: "message1 id message"
message1.id == message.id
message1.from == 'John Smith <[email protected]>'
message1.to == ['Mary Smith <[email protected]>']
message1.subject == 'Subject'
message1.text == 'Text'

when: 'deleted the message'
asynchronousMailPersistenceService.delete(message1, true)
Expand Down Expand Up @@ -91,8 +95,11 @@ class AsynchronousMailPersistenceServiceSpec extends Specification {
text: 'Text'
)

expect:
when:
asynchronousMailPersistenceService.save(message, true, true)
then:
AsynchronousMailMessage dbMessage = asynchronousMailPersistenceService.getMessage(message.id)
dbMessage.bcc == ['[email protected]']

cleanup:
asynchronousMailPersistenceService.delete(message, true)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import org.quartz.TriggerKey

@Slf4j
class AsynchronousMailGrailsPlugin extends Plugin {
def grailsVersion = "3.1.0 > *"
def grailsVersion = "3.3.0 > *"
def loadAfter = ['mail', 'quartz', 'hibernate', 'hibernate3', 'hibernate4', 'hibernate5', 'mongodb']

Closure doWithSpring() { { ->
Expand All @@ -22,7 +22,8 @@ class AsynchronousMailGrailsPlugin extends Plugin {
}
}

void onStartup() {
@Override
void onStartup(Map<String, Object> event) {
// Starts jobs
startJobs(applicationContext)
}
Expand Down

0 comments on commit f1063ca

Please sign in to comment.