hive-c0re: finish chrono-clock migration

This commit is contained in:
damocles 2026-08-01 23:55:00 +02:00 committed by mara
commit 9293c5d580
14 changed files with 82 additions and 78 deletions

View file

@ -321,8 +321,8 @@ fn schedule_to_wire(s: crate::scheduled_prompts::Schedule) -> hive_sh4re::WireSc
owner: s.owner,
body: s.body,
interval_seconds: s.interval_seconds,
next_fire_at_unix: hive_sh4re::wire_time::from_secs(s.next_fire_at_unix),
created_at_unix: hive_sh4re::wire_time::from_secs(s.created_at_unix),
next_fire_at_unix: s.next_fire_at_unix,
created_at_unix: s.created_at_unix,
source: match s.source {
crate::scheduled_prompts::ScheduleSource::Operator => {
hive_sh4re::WireScheduleSource::Operator
@ -331,16 +331,16 @@ fn schedule_to_wire(s: crate::scheduled_prompts::Schedule) -> hive_sh4re::WireSc
hive_sh4re::WireScheduleSource::Approval { id }
}
},
cancelled_at_unix: s.cancelled_at_unix.map(hive_sh4re::wire_time::from_secs),
paused_at_unix: s.paused_at_unix.map(hive_sh4re::wire_time::from_secs),
cancelled_at_unix: s.cancelled_at_unix,
paused_at_unix: s.paused_at_unix,
description: s.description,
targets: s
.targets
.into_iter()
.map(|t| hive_sh4re::WireScheduleTarget {
target: t.target,
cancelled_at_unix: t.cancelled_at_unix.map(hive_sh4re::wire_time::from_secs),
last_fired_at_unix: t.last_fired_at_unix.map(hive_sh4re::wire_time::from_secs),
cancelled_at_unix: t.cancelled_at_unix,
last_fired_at_unix: t.last_fired_at_unix,
last_result: t.last_result,
})
.collect(),