Commit 57089ec4 authored by Leonardo Aramaki's avatar Leonardo Aramaki

Update KeepAliveJob behavior to cancel only pending job requests instead of also the running ones

parent a81fdf6b
......@@ -26,8 +26,11 @@ class KeepAliveJob : Job() {
.schedule()
}
fun cancel() {
JobManager.instance().cancelAllForTag(TAG)
fun cancelPendingJobRequests() {
val allJobRequests = JobManager.instance().getAllJobRequestsForTag(TAG)
allJobRequests.forEach { jobRequest ->
jobRequest.cancelAndEdit()
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment