fix(timer): improve delay timer handling during task execution

This commit is contained in:
Tunglies 2026-03-28 01:45:02 +08:00
parent add2c1036b
commit 4ee6402e29
No known key found for this signature in database
GPG Key ID: B9B01B389469B3E8

View File

@ -126,11 +126,11 @@ impl Timer {
profiles_to_update.len()
);
let timer_map = self.timer_map.read();
let delay_timer = self.delay_timer.write();
for uid in profiles_to_update {
if let Some(task) = timer_map.get(&uid) {
logging!(info, Type::Timer, "立即执行任务: uid={}", uid);
let delay_timer = self.delay_timer.write();
if let Err(e) = delay_timer.advance_task(task.task_id) {
logging!(warn, Type::Timer, "Failed to advance task {}: {}", uid, e);
}