mirror of
https://github.com/slhaf/Partner.git
synced 2026-05-12 08:43:02 +08:00
fix(ActionScheduler): remove triggered hour actions by uuid to avoid removeAll mismatch
This commit is contained in:
@@ -140,7 +140,8 @@ class ActionScheduler : AgentRunningSubModule<Set<ScheduledActionData>, Void>()
|
||||
val bucket = wheel[i]
|
||||
if (bucket.isNotEmpty()) {
|
||||
toTrigger.addAll(bucket)
|
||||
actionsGroupByHour[triggerHour].removeAll(bucket)
|
||||
val bucketUuids = bucket.asSequence().map { it.uuid }.toHashSet()
|
||||
actionsGroupByHour[triggerHour].removeIf { it.uuid in bucketUuids }
|
||||
bucket.clear() // 避免重复触发
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user