File tree Expand file tree Collapse file tree 3 files changed +9
-7
lines changed
services/com/wizpanda/file
src/test/groovy/com/wizpanda/file Expand file tree Collapse file tree 3 files changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -4,14 +4,16 @@ package com.wizpanda.file
4
4
* Job to delete marked stored files from S3.
5
5
*
6
6
* @author Ankit Kumar Singh
7
- * @since 1.0 .3
7
+ * @since 0.1 .3
8
8
*/
9
9
class DeleteMarkedFileJob {
10
10
11
11
FileDeletionService fileDeletionService
12
12
13
+ def concurrent = false
14
+
13
15
static triggers = {
14
- simple repeatInterval : 1000l * 60 * 60 * 2 // execute job once in 2 hour
16
+ simple startDelay : 1000l * 60 * 15 , repeatInterval : 1000l * 60 * 60 * 2 // execute job once in 2 hour
15
17
}
16
18
17
19
def execute () {
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ import groovy.time.TimeCategory
8
8
* Service class to perform delete operations on file which are marked for deletion.
9
9
*
10
10
* @author Ankit Kumar Singh
11
- * @since 1.0 .3
11
+ * @since 0.1 .3
12
12
*/
13
13
@Transactional
14
14
class FileDeletionService {
@@ -31,7 +31,7 @@ class FileDeletionService {
31
31
isNotNull(" markedForDeletion" )
32
32
le(" markedForDeletion" , dateForDeletion)
33
33
34
- maxResult (MAX )
34
+ maxResults (MAX )
35
35
}
36
36
37
37
storedFileList. each { StoredFile storedFile ->
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ package com.wizpanda.file
3
3
import grails.testing.services.ServiceUnitTest
4
4
import spock.lang.Specification
5
5
6
- class FileDeletionServiceSpec extends Specification implements ServiceUnitTest<FileDeletionService > {
6
+ class FileDeletionServiceSpec extends Specification implements ServiceUnitTest<FileDeletionService > {
7
7
8
8
def setup () {
9
9
}
@@ -12,7 +12,7 @@ class FileDeletionServiceSpec extends Specification implements ServiceUnitTest<F
12
12
}
13
13
14
14
void " test something" () {
15
- expect :" fix me"
16
- true == false
15
+ expect : " fix me"
16
+ true == false
17
17
}
18
18
}
You can’t perform that action at this time.
0 commit comments