修正spacetime-client checkpoint facade的落点
- facade 方法补进真正参与编译的 active/external_generation.rs,此前误写在未被编译的重复文件里 - mapper 重新导出 ExternalGenerationJobProviderCheckpointRecordInput,调用方无需从子模块路径引用 - 删除未被编译的 src/external_generation.rs 重复副本,避免再次改到死文件
This commit is contained in:
@@ -359,6 +359,36 @@ impl SpacetimeClient {
|
||||
.await
|
||||
}
|
||||
|
||||
/// 写入 provider 任务 checkpoint。
|
||||
///
|
||||
/// 只在 submit 成功、拿到 provider task id 之后调用一次;procedure 侧对已有
|
||||
/// checkpoint 的 job 直接拒绝,调用方不得用重试来覆盖,这是 at-most-once submit
|
||||
/// 的数据层保证。写入失败意味着本次 attempt 无法安全续跑,按失败处理而不是重新 submit。
|
||||
pub async fn set_external_generation_job_provider_checkpoint(
|
||||
&self,
|
||||
input: ExternalGenerationJobProviderCheckpointRecordInput,
|
||||
) -> Result<ExternalGenerationJobRecord, SpacetimeClientError> {
|
||||
let procedure_input = input.into();
|
||||
|
||||
self.call_after_connect(
|
||||
"set_external_generation_job_provider_checkpoint_and_return",
|
||||
move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.set_external_generation_job_provider_checkpoint_and_return_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(SpacetimeClientError::from_sdk_error)
|
||||
.and_then(map_external_generation_job_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
},
|
||||
);
|
||||
},
|
||||
)
|
||||
.await
|
||||
}
|
||||
|
||||
pub async fn get_external_generation_job(
|
||||
&self,
|
||||
input: ExternalGenerationJobGetRecordInput,
|
||||
|
||||
@@ -85,9 +85,9 @@ pub use self::external_generation::{
|
||||
ExternalGenerationJobEnqueueRecordInput, ExternalGenerationJobFailRecordInput,
|
||||
ExternalGenerationJobGetRecordInput, ExternalGenerationJobListRecord,
|
||||
ExternalGenerationJobListRecordInput, ExternalGenerationJobPhaseUpdateRecordInput,
|
||||
ExternalGenerationJobRecord, ExternalGenerationJobRenewLeaseRecordInput,
|
||||
ExternalGenerationJobSummaryListRecord, ExternalGenerationJobSummaryRecord,
|
||||
ExternalGenerationQueueStatsRecord,
|
||||
ExternalGenerationJobProviderCheckpointRecordInput, ExternalGenerationJobRecord,
|
||||
ExternalGenerationJobRenewLeaseRecordInput, ExternalGenerationJobSummaryListRecord,
|
||||
ExternalGenerationJobSummaryRecord, ExternalGenerationQueueStatsRecord,
|
||||
};
|
||||
pub use self::llm_router_account::{LlmRouterAccountRecord, LlmRouterAccountUpsertRecordInput};
|
||||
pub use self::runtime::FeatureGateConfigRecord;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user