mirror of
https://github.com/SeriousBug/gandi-live-dns-rust
synced 2024-05-18 03:09:04 -05:00
use a single threaded executor
This commit is contained in:
parent
e4938a3f95
commit
8572014c10
|
@ -43,7 +43,7 @@ async fn get_ip(api_url: &str) -> anyhow::Result<String> {
|
|||
Ok(text)
|
||||
}
|
||||
|
||||
#[tokio::main]
|
||||
#[tokio::main(flavor = "current_thread")]
|
||||
async fn main() -> anyhow::Result<()> {
|
||||
let opts = opts::Opts::parse();
|
||||
let conf = config::load_config(&opts)
|
||||
|
@ -87,7 +87,7 @@ async fn main() -> anyhow::Result<()> {
|
|||
map.insert("rrset_values", vec![ip]);
|
||||
let req = client.put(url).json(&map);
|
||||
let task_governor = governor.clone();
|
||||
let task = tokio::task::spawn(async move {
|
||||
let task = tokio::task::spawn_local(async move {
|
||||
task_governor.until_ready_with_jitter(retry_jitter).await;
|
||||
println!("Updating {}", &fqdn);
|
||||
match req.send().await {
|
||||
|
|
Loading…
Reference in a new issue