mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-06-30 19:15:50 +01:00
Fix bug allowing concurrent execution of jobs in the same queue.
There was an issue where a higher priority job in the same queue would become the new most eligible job, even if the current most eligible job was actively running.
This commit is contained in:
@@ -492,6 +492,10 @@ class FastJobStorage(private val jobDatabase: JobDatabase) : JobStorage {
|
||||
private fun placeJobInEligibleList(jobCandidate: MinimalJobSpec) {
|
||||
val existingJobInQueue = jobCandidate.queueKey?.let { mostEligibleJobForQueue[it] }
|
||||
if (existingJobInQueue != null) {
|
||||
if (existingJobInQueue.isRunning) {
|
||||
return
|
||||
}
|
||||
|
||||
if (jobCandidate.globalPriority < existingJobInQueue.globalPriority) {
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user