We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3034592 commit 6747c5dCopy full SHA for 6747c5d
examples/provision.rs
@@ -1,8 +1,6 @@
1
use std::io;
2
-use std::time::Duration;
3
4
use clap::Parser;
5
-use tokio::time::sleep;
6
use tracing::info;
7
8
use instant_acme::{
@@ -90,12 +88,7 @@ async fn main() -> anyhow::Result<()> {
90
88
// Finalize the order and print certificate chain, private key and account credentials.
91
89
92
let private_key_pem = order.finalize().await?;
93
- let cert_chain_pem = loop {
94
- match order.certificate().await? {
95
- Some(cert_chain_pem) => break cert_chain_pem,
96
- None => sleep(Duration::from_secs(1)).await,
97
- }
98
- };
+ let cert_chain_pem = order.poll_certificate(&RetryPolicy::default()).await?;
99
100
info!("certificate chain:\n\n{cert_chain_pem}");
101
info!("private key:\n\n{private_key_pem}");
0 commit comments