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

Commit f1063ca

Browse files
committed
#80 Fix onStartup signature
Quartz 2.0.13 Flush on send
1 parent 8e7db0f commit f1063ca

File tree

5 files changed

+16
-8
lines changed

5 files changed

+16
-8
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,13 @@ Installation
2828
To install just add the plugin to the plugins block of `build.gradle`. For Grails 3.3.x
2929

3030
```groovy
31-
compile "org.grails.plugins:asynchronous-mail:2.0.1"
31+
compile "org.grails.plugins:asynchronous-mail:2.0.2"
3232
```
3333

3434
For Grails 3.2.11 and earlier
3535

3636
```groovy
37-
compile "org.grails.plugins:asynchronous-mail:2.0.1-3.2.x"
37+
compile "org.grails.plugins:asynchronous-mail:2.0.2-3.2.x"
3838
```
3939

4040
Configuration

build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ buildscript {
99
}
1010
}
1111

12-
version "2.0.1"
12+
version "2.0.2"
1313
group "org.grails.plugins"
1414

1515
apply plugin: 'idea'
@@ -49,7 +49,7 @@ dependencies {
4949
testCompile "com.h2database:h2:1.4.196"
5050

5151
compile "org.grails.plugins:mail:2.0.0"
52-
compile "org.grails.plugins:quartz:2.0.12"
52+
compile "org.grails.plugins:quartz:2.0.13"
5353
}
5454

5555
assets {

grails-app/services/grails/plugin/asyncmail/AsynchronousMailService.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ class AsynchronousMailService {
4545
savedMessage = asynchronousMailPersistenceService.save(message, true, true)
4646
}
4747
} else {
48-
savedMessage = asynchronousMailPersistenceService.save(message, immediately, true)
48+
savedMessage = asynchronousMailPersistenceService.save(message, true, true)
4949
}
5050

5151
if (!savedMessage) {

src/integration-test/groovy/grails/plugin/asyncmail/AsynchronousMailPersistenceServiceSpec.groovy

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ class AsynchronousMailPersistenceServiceSpec extends Specification {
3939

4040
then: "message1 id message"
4141
message1.id == message.id
42+
message1.from == 'John Smith <john@example.com>'
43+
message1.to == ['Mary Smith <mary@example.com>']
44+
message1.subject == 'Subject'
45+
message1.text == 'Text'
4246

4347
when: 'deleted the message'
4448
asynchronousMailPersistenceService.delete(message1, true)
@@ -91,8 +95,11 @@ class AsynchronousMailPersistenceServiceSpec extends Specification {
9195
text: 'Text'
9296
)
9397

94-
expect:
98+
when:
9599
asynchronousMailPersistenceService.save(message, true, true)
100+
then:
101+
AsynchronousMailMessage dbMessage = asynchronousMailPersistenceService.getMessage(message.id)
102+
dbMessage.bcc == ['mary@example.com']
96103

97104
cleanup:
98105
asynchronousMailPersistenceService.delete(message, true)

src/main/groovy/grails/plugin/asyncmail/AsynchronousMailGrailsPlugin.groovy

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import org.quartz.TriggerKey
1010

1111
@Slf4j
1212
class AsynchronousMailGrailsPlugin extends Plugin {
13-
def grailsVersion = "3.1.0 > *"
13+
def grailsVersion = "3.3.0 > *"
1414
def loadAfter = ['mail', 'quartz', 'hibernate', 'hibernate3', 'hibernate4', 'hibernate5', 'mongodb']
1515

1616
Closure doWithSpring() { { ->
@@ -22,7 +22,8 @@ class AsynchronousMailGrailsPlugin extends Plugin {
2222
}
2323
}
2424

25-
void onStartup() {
25+
@Override
26+
void onStartup(Map<String, Object> event) {
2627
// Starts jobs
2728
startJobs(applicationContext)
2829
}

0 commit comments

Comments
 (0)