Skip to main content

GoalNotificationStore

Trait GoalNotificationStore 

Source
pub trait GoalNotificationStore: Send + Sync {
    // Provided methods
    fn count_active_evergreen_goals<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<i64>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait { ... }
    fn get_goals_needing_notification<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<Goal>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait { ... }
    fn mark_goal_notified<'life0, 'life1, 'async_trait>(
        &'life0 self,
        _goal_id: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait { ... }
    fn cleanup_stale_goals<'life0, 'async_trait>(
        &'life0 self,
        _stale_hours: i64,
    ) -> Pin<Box<dyn Future<Output = Result<u64>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait { ... }
}
Expand description

Goal lifecycle cleanup and user notification bookkeeping.

Provided Methods§

Source

fn count_active_evergreen_goals<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<i64>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Count active evergreen (continuous) goals.

Source

fn get_goals_needing_notification<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Vec<Goal>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get goals that completed/failed but haven’t been notified to the user yet.

Source

fn mark_goal_notified<'life0, 'life1, 'async_trait>( &'life0 self, _goal_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Mark a goal as notified (set notified_at timestamp).

Source

fn cleanup_stale_goals<'life0, 'async_trait>( &'life0 self, _stale_hours: i64, ) -> Pin<Box<dyn Future<Output = Result<u64>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Mark stale active goals as abandoned/failed.

  • Finite orchestration goals: active goals with no update in stale_hours → failed
  • Continuous orchestration goals: skipped (they have their own idle detection)
  • Personal goals: skipped

Returns the number of goals cleaned up.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§