kopia lustrzana https://github.com/ryukoposting/Signal-Android
Don't run FTS optimize job (for now).
rodzic
6f1b03eac6
commit
f26b2c0b2a
|
@ -1,7 +1,5 @@
|
||||||
package org.thoughtcrime.securesms.jobs
|
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.Data
|
||||||
import org.thoughtcrime.securesms.jobmanager.Job
|
import org.thoughtcrime.securesms.jobmanager.Job
|
||||||
import org.thoughtcrime.securesms.transport.RetryLaterException
|
import org.thoughtcrime.securesms.transport.RetryLaterException
|
||||||
|
@ -18,7 +16,8 @@ class OptimizeMessageSearchIndexJob private constructor(parameters: Parameters)
|
||||||
|
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
fun enqueue() {
|
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 getNextRunAttemptBackoff(pastAttemptCount: Int, exception: Exception): Long = 30.seconds.inWholeMilliseconds
|
||||||
|
|
||||||
override fun onRun() {
|
override fun onRun() {
|
||||||
val success = SignalDatabase.messageSearch.optimizeIndex(5.seconds.inWholeMilliseconds)
|
// TODO [greyson] Temporarily disabled until we can figure out what to do.
|
||||||
|
// val success = SignalDatabase.messageSearch.optimizeIndex(5.seconds.inWholeMilliseconds)
|
||||||
if (!success) {
|
//
|
||||||
throw RetryLaterException()
|
// if (!success) {
|
||||||
}
|
// throw RetryLaterException()
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
class Factory : Job.Factory<OptimizeMessageSearchIndexJob> {
|
class Factory : Job.Factory<OptimizeMessageSearchIndexJob> {
|
||||||
|
|
Ładowanie…
Reference in New Issue