fix(#36): recover heartbeat before task polling
This commit is contained in:
@@ -142,11 +142,6 @@ class AgentForegroundService : Service() {
|
||||
recoverInterruptedPurchases(api, activeCredentials.token)
|
||||
flushPurchaseOutbox(api, activeCredentials.token)
|
||||
runningTaskId.set(purchaseStore.activeTaskId())
|
||||
if (runningTaskId.get() == null) {
|
||||
api.nextPurchaseTask(activeCredentials.token)?.takeIf { it.status == "running" }?.let {
|
||||
runningTaskId.set(it.taskId)
|
||||
}
|
||||
}
|
||||
}
|
||||
val heartbeat = api.heartbeat(
|
||||
activeCredentials.token,
|
||||
|
||||
Reference in New Issue
Block a user