MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / acknowledge_checkpoint

Method acknowledge_checkpoint

atomic-cli/src/commands/agent/provenance_rpc.rs:813–849  ·  view source on GitHub ↗
(
        &self,
        checkpoint: &JournalCheckpointAttempt,
        manifest_hash: Hash,
        completed_at: i64,
    )

Source from the content-addressed store, hash-verified

811 }
812
813 fn acknowledge_checkpoint(
814 &self,
815 checkpoint: &JournalCheckpointAttempt,
816 manifest_hash: Hash,
817 completed_at: i64,
818 ) -> Result<(), String> {
819 let reference = self.reference.clone();
820 let provenance_id = checkpoint.provenance_id;
821 let expected_generation = checkpoint.attempt_generation;
822 let manifest_hash = hash_proto(&manifest_hash);
823 run_outside_async_runtime(move || {
824 current_thread_runtime()?.block_on(async {
825 request_with_reconnect("acknowledge checkpoint", |client| {
826 let reference = reference.clone();
827 let manifest_hash = manifest_hash.clone();
828 async move {
829 provenance_client(client)
830 .acknowledge_checkpoint(pb::AcknowledgeCheckpointRequest {
831 repository: Some(reference),
832 meta: request_meta(completed_at),
833 provenance_id,
834 expected_generation,
835 manifest_hash: Some(manifest_hash),
836 completed_at: Some(prost_types::Timestamp {
837 seconds: completed_at,
838 nanos: 0,
839 }),
840 })
841 .await
842 .map(|_| ())
843 }
844 })
845 .await
846 })
847 })
848 .map_err(|error: anyhow::Error| error.to_string())
849 }
850
851 fn stop_turn(
852 &self,

Callers 1

runMethod · 0.45

Calls 7

current_thread_runtimeFunction · 0.85
request_with_reconnectFunction · 0.85
provenance_clientFunction · 0.85
hash_protoFunction · 0.70
request_metaFunction · 0.70
cloneMethod · 0.45

Tested by

no test coverage detected