Skip to content

Commit

Permalink
rename retention to cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
peh committed Mar 26, 2017
1 parent dbed1ce commit 411f09d
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion grails-app/conf/application.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def genericJobs = [
def dbHeavyJobs = [
DeleteEmptyGroupsJob,
RefindFromCollectorJob,
DataRetentionJob
EntryCleanupJob
]

grails {
Expand Down
2 changes: 1 addition & 1 deletion grails-app/init/BootStrap.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class BootStrap {
applicationService.create(app)
}

jesqueService.enqueue(DataRetentionJob.queueName, DataRetentionJob)
jesqueService.enqueue(EntryCleanupJob.queueName, EntryCleanupJob)

}

Expand Down
2 changes: 1 addition & 1 deletion grails-app/jobs/errbuddy/DeleteEmptyGroupsJob.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
2 changes: 1 addition & 1 deletion grails-app/services/errbuddy/ApplicationService.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 411f09d

Please sign in to comment.