diff --git a/grails-app/conf/application.groovy b/grails-app/conf/application.groovy index 7c5ee1c..c4e1faa 100644 --- a/grails-app/conf/application.groovy +++ b/grails-app/conf/application.groovy @@ -66,7 +66,7 @@ def genericJobs = [ def dbHeavyJobs = [ DeleteEmptyGroupsJob, RefindFromCollectorJob, - DataRetentionJob + EntryCleanupJob ] grails { diff --git a/grails-app/init/BootStrap.groovy b/grails-app/init/BootStrap.groovy index cf8b415..5c1711b 100644 --- a/grails-app/init/BootStrap.groovy +++ b/grails-app/init/BootStrap.groovy @@ -50,7 +50,7 @@ class BootStrap { applicationService.create(app) } - jesqueService.enqueue(DataRetentionJob.queueName, DataRetentionJob) + jesqueService.enqueue(EntryCleanupJob.queueName, EntryCleanupJob) } diff --git a/grails-app/jobs/errbuddy/DeleteEmptyGroupsJob.groovy b/grails-app/jobs/errbuddy/DeleteEmptyGroupsJob.groovy index 7a1c477..41c2087 100644 --- a/grails-app/jobs/errbuddy/DeleteEmptyGroupsJob.groovy +++ b/grails-app/jobs/errbuddy/DeleteEmptyGroupsJob.groovy @@ -3,7 +3,7 @@ package errbuddy class DeleteEmptyGroupsJob { // we put this one in the retention queue as they might deadlock each other - static queueName = DataRetentionJob.queueName + static queueName = EntryCleanupJob.queueName static triggers = { // 10 minutes after every hour diff --git a/grails-app/jobs/errbuddy/DataRetentionJob.groovy b/grails-app/jobs/errbuddy/EntryCleanupJob.groovy similarity index 85% rename from grails-app/jobs/errbuddy/DataRetentionJob.groovy rename to grails-app/jobs/errbuddy/EntryCleanupJob.groovy index 3a4ec0e..e9614f2 100644 --- a/grails-app/jobs/errbuddy/DataRetentionJob.groovy +++ b/grails-app/jobs/errbuddy/EntryCleanupJob.groovy @@ -3,13 +3,13 @@ package errbuddy import grails.core.GrailsApplication import org.joda.time.DateTime -class DataRetentionJob { +class EntryCleanupJob { - static queueName = "retention" + static queueName = "cleanup" static triggers = { - cron name: 'DataRetentionJob', - jesqueJobName: DataRetentionJob.name, + cron name: 'EntryCleanupJob', + jesqueJobName: EntryCleanupJob.name, jesqueQueue: queueName, cronExpression: "0 */5 * * * ?", args: [0] diff --git a/grails-app/services/errbuddy/ApplicationService.groovy b/grails-app/services/errbuddy/ApplicationService.groovy index 246bbe9..f576920 100644 --- a/grails-app/services/errbuddy/ApplicationService.groovy +++ b/grails-app/services/errbuddy/ApplicationService.groovy @@ -42,7 +42,7 @@ class ApplicationService { app.save() // this will not clear all entries immediately // the scheduled data retention will take care of cleaning the app bit by bit - jesqueService.enqueueAt(DateTime.now().plusSeconds(5), "put", DataRetentionJob, [app.id]) + jesqueService.enqueueAt(DateTime.now().plusSeconds(5), "put", EntryCleanupJob, [app.id]) } def delete(App app) {