Permalink
Browse files

disable refind as long as it’s broken

  • Loading branch information...
peh committed Mar 27, 2017
1 parent 16e7771 commit 67eb977b59d1436b6c8cd42788dc1f0b4c0d737f
@@ -60,12 +60,12 @@ def genericJobs = [
ApplicationDeploymentJob,
DeleteEntryGroupJob,
FindSimilarEntriesJob,
ReindexJob
ReindexJob,
RefindFromCollectorJob
]
def dbHeavyJobs = [
DeleteEmptyGroupsJob,
RefindFromCollectorJob,
EntryCleanupJob
]
@@ -1,6 +1,7 @@
package errbuddy
import grails.core.GrailsApplication
import grails.plugins.jesque.JesqueService
import org.joda.time.DateTime
class EntryCleanupJob {
@@ -17,6 +18,7 @@ class EntryCleanupJob {
EntryCleanupService entryCleanupService
GrailsApplication grailsApplication
JesqueService jesqueService
def perform(long id = 0) {
if (id) {
@@ -27,8 +29,11 @@ class EntryCleanupJob {
} else {
App.createCriteria().list {
eq('enabled', true)
}.each { App app ->
handle(app)
projections {
property('id')
}
}.each {
jesqueService.enqueue(queueName, EntryCleanupJob, [it])
}
}
}
@@ -4,14 +4,15 @@ class RefindFromCollectorJob {
static queueName = "refind"
static triggers = {
// every 2 hours
cron name: 'RefindFromCollectorJob',
jesqueJobName: RefindFromCollectorJob.name,
jesqueQueue: queueName,
cronExpression: "0 * * ? * * *",
args: []
}
// trigger is disabled for now
// static triggers = {
// // every 2 hours
// cron name: 'RefindFromCollectorJob',
// jesqueJobName: RefindFromCollectorJob.name,
// jesqueQueue: queueName,
// cronExpression: "0 * * ? * * *",
// args: []
// }
def entryService
@@ -0,0 +1,11 @@
databaseChangeLog = {
changeSet(author: "philipp", id: "20172703-2") {
preConditions(onFail: "MARK_RAN") {
indexExists(name: "refind_similar")
}
createIndex(tableName: "entry", indexName: "refind_similar") {
column(name: "date_created")
}
}
}
@@ -188,7 +188,7 @@ class EntryService {
projections {
property('id')
}
}?.each { it
}?.each {
jesqueService.enqueue("generic", FindSimilarEntriesJob, [it])
}
}

0 comments on commit 67eb977

Please sign in to comment.