hive-c0re: finish chrono-clock migration
This commit is contained in:
parent
f4a35786b1
commit
9293c5d580
14 changed files with 82 additions and 78 deletions
|
|
@ -20,10 +20,10 @@
|
|||
//! (de)serialisation, not the read.
|
||||
|
||||
use anyhow::Result;
|
||||
use chrono::Utc;
|
||||
use hive_sh4re::LooseEnd;
|
||||
|
||||
use crate::coordinator::Coordinator;
|
||||
use hive_sh4re::wire_time::now_unix;
|
||||
|
||||
/// Open threads pending against `agent`:
|
||||
/// - undelivered inbox messages this agent still owes itself a `recv`
|
||||
|
|
@ -42,7 +42,7 @@ use hive_sh4re::wire_time::now_unix;
|
|||
/// Propagates errors from `count_pending` and the pending-approval
|
||||
/// sqlite query.
|
||||
pub fn for_agent(coord: &Coordinator, agent: &str) -> Result<Vec<LooseEnd>> {
|
||||
let now = now_unix();
|
||||
let now = Utc::now().timestamp();
|
||||
let mut out = Vec::new();
|
||||
// Undelivered inbox messages this agent still owes itself a `recv`
|
||||
// for. Surfaced first (most actionable) and only when non-zero so a
|
||||
|
|
@ -81,7 +81,7 @@ pub fn for_agent(coord: &Coordinator, agent: &str) -> Result<Vec<LooseEnd>> {
|
|||
/// only; sub-agents can't see each other's threads via the agent surface
|
||||
/// (`for_agent` filters by name).
|
||||
pub fn hive_wide(coord: &Coordinator) -> Result<Vec<LooseEnd>> {
|
||||
let now = now_unix();
|
||||
let now = Utc::now().timestamp();
|
||||
let mut out = Vec::new();
|
||||
for a in coord.approvals.pending()? {
|
||||
out.push(LooseEnd::Approval {
|
||||
|
|
|
|||
Loading…
Reference in a new issue