Skip to main content
Glama
execute.rs1.11 kB
use telemetry::prelude::*; use crate::{ AttributePrototype, AttributeValue, DalContext, Func, func::authoring::FuncAuthoringResult, }; #[instrument( name = "func.authoring.execute_func.execute_attribute_func", level = "debug", skip(ctx) )] pub(crate) async fn execute_attribute_func( ctx: &DalContext, func: &Func, ) -> FuncAuthoringResult<()> { let attribute_prototype_ids = AttributePrototype::list_ids_for_func_id(ctx, func.id).await?; if attribute_prototype_ids.is_empty() { warn!(%func.id, "nothing to execute: no attribute prototype ids found for attribute func id"); return Ok(()); } for attribute_prototype_id in attribute_prototype_ids { let attribute_value_ids = AttributePrototype::attribute_value_ids(ctx, attribute_prototype_id).await?; for attribute_value_id in &attribute_value_ids { AttributeValue::update_from_prototype_function(ctx, *attribute_value_id).await?; } ctx.add_dependent_values_and_enqueue(attribute_value_ids) .await?; } Ok(()) }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/systeminit/si'

If you have feedback or need assistance with the MCP directory API, please join our Discord server