mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-02-26 04:33:36 +00:00
Don't run FTS optimize job (for now).
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
package org.thoughtcrime.securesms.jobs
|
||||
|
||||
import org.thoughtcrime.securesms.database.SignalDatabase
|
||||
import org.thoughtcrime.securesms.dependencies.ApplicationDependencies
|
||||
import org.thoughtcrime.securesms.jobmanager.Data
|
||||
import org.thoughtcrime.securesms.jobmanager.Job
|
||||
import org.thoughtcrime.securesms.transport.RetryLaterException
|
||||
@@ -18,7 +16,8 @@ class OptimizeMessageSearchIndexJob private constructor(parameters: Parameters)
|
||||
|
||||
@JvmStatic
|
||||
fun enqueue() {
|
||||
ApplicationDependencies.getJobManager().add(OptimizeMessageSearchIndexJob())
|
||||
// TODO [greyson] Temporarily disabled until we can figure out what to do.
|
||||
// ApplicationDependencies.getJobManager().add(OptimizeMessageSearchIndexJob())
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,11 +36,12 @@ class OptimizeMessageSearchIndexJob private constructor(parameters: Parameters)
|
||||
override fun getNextRunAttemptBackoff(pastAttemptCount: Int, exception: Exception): Long = 30.seconds.inWholeMilliseconds
|
||||
|
||||
override fun onRun() {
|
||||
val success = SignalDatabase.messageSearch.optimizeIndex(5.seconds.inWholeMilliseconds)
|
||||
|
||||
if (!success) {
|
||||
throw RetryLaterException()
|
||||
}
|
||||
// TODO [greyson] Temporarily disabled until we can figure out what to do.
|
||||
// val success = SignalDatabase.messageSearch.optimizeIndex(5.seconds.inWholeMilliseconds)
|
||||
//
|
||||
// if (!success) {
|
||||
// throw RetryLaterException()
|
||||
// }
|
||||
}
|
||||
|
||||
class Factory : Job.Factory<OptimizeMessageSearchIndexJob> {
|
||||
|
||||
Reference in New Issue
Block a user