Skip to main content

store_increment

Function store_increment 

Source
pub async fn store_increment(
    store: &Option<Arc<TaskStore>>,
    repo: &str,
    task_id: &str,
    field: &str,
) -> Result<u64>
Expand description

Increment a counter in the task store.

Uses store.increment() for an atomic SQL field + 1. Returns Ok(new_value) on success or Err(anyhow::Error) when the store is unavailable, the task cannot be resolved, or the underlying SQL increment failed. Callers must handle errors explicitly — this helper no longer silently returns 0 on error.