(
&self,
checkpoint: &JournalCheckpointAttempt,
manifest_hash: Hash,
completed_at: i64,
)
| 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, |
no test coverage detected