bankai/daemon_store/mutations

Task creation and mutation service.

Coordinates atomic single-task mutations, gate configuration, cluster-fenced updates, and duplicate merging in Mnesia.

Types

pub type Claimed {
  Claimed(
    task: types.Task,
    admission: option.Option(cluster.Admission),
  )
}

Constructors

Values

pub fn add_label(
  workspace: String,
  id: String,
  label: String,
) -> Result(json.Json, String)
pub fn claim(
  workspace: String,
  id: String,
  rest: List(String),
) -> Result(json.Json, String)
pub fn claim_next_ready(
  workspace: String,
  rest: List(String),
) -> Result(json.Json, String)
pub fn claim_record(
  workspace: String,
  id: String,
  rest: List(String),
) -> Result(Claimed, String)
pub fn claimed_json(claimed: Claimed) -> json.Json
pub fn close(
  workspace: String,
  id: String,
  reason: String,
) -> Result(json.Json, String)
pub fn create(
  workspace: String,
  title: String,
  rest: List(String),
) -> Result(json.Json, String)
pub fn defer_until(
  workspace: String,
  id: String,
  until_text: String,
) -> Result(json.Json, String)
pub fn heartbeat(
  workspace: String,
  id: String,
  ttl: option.Option(String),
) -> Result(json.Json, String)

Refresh a live claim’s lease (bk-ccbf). Exclusive op; fails on unclaimed tasks. Local mode only, same rule as update_fields.

pub fn merge(
  workspace: String,
  source_id: String,
  canonical_id: String,
) -> Result(json.Json, String)
pub fn reclaim_expired(
  workspace: String,
) -> Result(json.Json, String)

Free tasks whose claim lease has expired (bk-ccbf): back to open, assignee and lease cleared. Returns the reclaimed ids.

pub fn release(
  workspace: String,
  id: String,
) -> Result(json.Json, String)
pub fn remove_label(
  workspace: String,
  id: String,
  label: String,
) -> Result(json.Json, String)
pub fn reopen(
  workspace: String,
  id: String,
) -> Result(json.Json, String)
pub fn satisfy_gate(
  workspace: String,
  id: String,
) -> Result(json.Json, String)
pub fn set_priority(
  workspace: String,
  id: String,
  priority_text: String,
) -> Result(json.Json, String)
pub fn undefer(
  workspace: String,
  id: String,
) -> Result(json.Json, String)
pub fn update(
  workspace: String,
  id: String,
  status: String,
) -> Result(json.Json, String)
pub fn update_fenced(
  workspace: String,
  id: String,
  status: String,
  fence_text: String,
) -> Result(json.Json, String)
pub fn update_fields(
  workspace: String,
  id: String,
  status: option.Option(String),
  claim: option.Option(String),
  force: Bool,
  ttl: option.Option(String),
  labels: List(String),
  priority: option.Option(String),
) -> Result(json.Json, String)

Composed field update (bk-57c1): status, claim, labels, priority in one transactional rewrite. Claim implies InProgress when no explicit status is given. Local mode only; clustered updates keep requiring –fence.

✨ Search Document