improve smtp retry algorithm

This commit is contained in:
Clément DOUIN 2024-09-25 08:31:06 +02:00
parent 32b72fb769
commit 2083e106f8
No known key found for this signature in database
GPG key ID: 353E4A18EE0FAB72

86
Cargo.lock generated
View file

@ -291,9 +291,9 @@ checksum = "8b75356056920673b02621b35afd0f7dda9306d03c79a30f5c56c44cf256e3de"
[[package]] [[package]]
name = "async-trait" name = "async-trait"
version = "0.1.82" version = "0.1.83"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a27b8a3a6e1a44fa4c8baf1f653e4172e81486d4941f2237e20dc2d0cf4ddff1" checksum = "721cae7de5c34fbb2acd27e21e6d2cf7b886dce0c27388d46c4e6c47ea4318dd"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
@ -1145,7 +1145,7 @@ dependencies = [
[[package]] [[package]]
name = "email-lib" name = "email-lib"
version = "0.25.0" version = "0.25.0"
source = "git+https://github.com/pimalaya/core#5b6372dcf2e5f14238324a6cd83d63b2f2187911" source = "git+https://github.com/pimalaya/core#0302f46f64f0e47b3573b9ae645a7154641bfd1a"
dependencies = [ dependencies = [
"async-trait", "async-trait",
"chrono", "chrono",
@ -1988,9 +1988,9 @@ dependencies = [
[[package]] [[package]]
name = "hyper-util" name = "hyper-util"
version = "0.1.8" version = "0.1.9"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "da62f120a8a37763efb0cf8fdf264b884c7b8b9ac8660b900c8661030c00e6ba" checksum = "41296eb09f183ac68eec06e03cdbea2e759633d4067b2f6552fc2e009bcad08b"
dependencies = [ dependencies = [
"bytes", "bytes",
"futures-channel", "futures-channel",
@ -2001,7 +2001,6 @@ dependencies = [
"pin-project-lite", "pin-project-lite",
"socket2 0.5.7", "socket2 0.5.7",
"tokio", "tokio",
"tower",
"tower-service", "tower-service",
"tracing", "tracing",
] ]
@ -2264,7 +2263,7 @@ dependencies = [
[[package]] [[package]]
name = "keyring-lib" name = "keyring-lib"
version = "0.4.3" version = "0.4.3"
source = "git+https://github.com/pimalaya/core#5b6372dcf2e5f14238324a6cd83d63b2f2187911" source = "git+https://github.com/pimalaya/core#0302f46f64f0e47b3573b9ae645a7154641bfd1a"
dependencies = [ dependencies = [
"keyring", "keyring",
"log", "log",
@ -2305,9 +2304,9 @@ dependencies = [
[[package]] [[package]]
name = "libc" name = "libc"
version = "0.2.158" version = "0.2.159"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d8adc4bb1803a324070e64a98ae98f38934d91957a99cfb3a43dcbc01bc56439" checksum = "561d97a539a36e26a9a5fad1ea11a3039a67714694aaa379433e580854bc3dc5"
[[package]] [[package]]
name = "libgpg-error-sys" name = "libgpg-error-sys"
@ -2334,7 +2333,7 @@ checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d"
dependencies = [ dependencies = [
"bitflags 2.6.0", "bitflags 2.6.0",
"libc", "libc",
"redox_syscall 0.5.4", "redox_syscall 0.5.5",
] ]
[[package]] [[package]]
@ -2746,7 +2745,7 @@ dependencies = [
[[package]] [[package]]
name = "oauth-lib" name = "oauth-lib"
version = "0.1.1" version = "0.1.1"
source = "git+https://github.com/pimalaya/core#5b6372dcf2e5f14238324a6cd83d63b2f2187911" source = "git+https://github.com/pimalaya/core#0302f46f64f0e47b3573b9ae645a7154641bfd1a"
dependencies = [ dependencies = [
"log", "log",
"oauth2", "oauth2",
@ -2930,7 +2929,7 @@ checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8"
dependencies = [ dependencies = [
"cfg-if", "cfg-if",
"libc", "libc",
"redox_syscall 0.5.4", "redox_syscall 0.5.5",
"smallvec", "smallvec",
"windows-targets 0.52.6", "windows-targets 0.52.6",
] ]
@ -3059,32 +3058,12 @@ dependencies = [
"shellexpand-utils", "shellexpand-utils",
"thiserror", "thiserror",
"toml", "toml",
"toml_edit 0.22.21", "toml_edit 0.22.22",
"tracing", "tracing",
"tracing-error", "tracing-error",
"tracing-subscriber", "tracing-subscriber",
] ]
[[package]]
name = "pin-project"
version = "1.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b6bf43b791c5b9e34c3d182969b4abb522f9343702850a2e57f460d00d09b4b3"
dependencies = [
"pin-project-internal",
]
[[package]]
name = "pin-project-internal"
version = "1.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.77",
]
[[package]] [[package]]
name = "pin-project-lite" name = "pin-project-lite"
version = "0.2.14" version = "0.2.14"
@ -3230,7 +3209,7 @@ dependencies = [
[[package]] [[package]]
name = "process-lib" name = "process-lib"
version = "0.4.2" version = "0.4.2"
source = "git+https://github.com/pimalaya/core#5b6372dcf2e5f14238324a6cd83d63b2f2187911" source = "git+https://github.com/pimalaya/core#0302f46f64f0e47b3573b9ae645a7154641bfd1a"
dependencies = [ dependencies = [
"log", "log",
"serde", "serde",
@ -3314,9 +3293,9 @@ dependencies = [
[[package]] [[package]]
name = "redox_syscall" name = "redox_syscall"
version = "0.5.4" version = "0.5.5"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0884ad60e090bf1345b93da0a5de8923c93884cd03f40dfcfddd3b4bee661853" checksum = "62871f2d65009c0256aed1b9cfeeb8ac272833c404e13d53d400cd0dad7a2ac0"
dependencies = [ dependencies = [
"bitflags 2.6.0", "bitflags 2.6.0",
] ]
@ -3707,7 +3686,7 @@ dependencies = [
[[package]] [[package]]
name = "secret-lib" name = "secret-lib"
version = "0.4.6" version = "0.4.6"
source = "git+https://github.com/pimalaya/core#5b6372dcf2e5f14238324a6cd83d63b2f2187911" source = "git+https://github.com/pimalaya/core#0302f46f64f0e47b3573b9ae645a7154641bfd1a"
dependencies = [ dependencies = [
"keyring-lib", "keyring-lib",
"log", "log",
@ -4298,7 +4277,7 @@ dependencies = [
"serde", "serde",
"serde_spanned", "serde_spanned",
"toml_datetime", "toml_datetime",
"toml_edit 0.22.21", "toml_edit 0.22.22",
] ]
[[package]] [[package]]
@ -4323,38 +4302,17 @@ dependencies = [
[[package]] [[package]]
name = "toml_edit" name = "toml_edit"
version = "0.22.21" version = "0.22.22"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3b072cee73c449a636ffd6f32bd8de3a9f7119139aff882f44943ce2986dc5cf" checksum = "4ae48d6208a266e853d946088ed816055e556cc6028c5e8e2b84d9fa5dd7c7f5"
dependencies = [ dependencies = [
"indexmap", "indexmap",
"serde", "serde",
"serde_spanned", "serde_spanned",
"toml_datetime", "toml_datetime",
"winnow 0.6.18", "winnow 0.6.19",
] ]
[[package]]
name = "tower"
version = "0.4.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c"
dependencies = [
"futures-core",
"futures-util",
"pin-project",
"pin-project-lite",
"tokio",
"tower-layer",
"tower-service",
]
[[package]]
name = "tower-layer"
version = "0.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e"
[[package]] [[package]]
name = "tower-service" name = "tower-service"
version = "0.3.3" version = "0.3.3"
@ -4907,9 +4865,9 @@ dependencies = [
[[package]] [[package]]
name = "winnow" name = "winnow"
version = "0.6.18" version = "0.6.19"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "68a9bda4691f099d435ad181000724da8e5899daa10713c2d432552b9ccd3a6f" checksum = "c52ac009d615e79296318c1bcce2d422aaca15ad08515e344feeda07df67a587"
dependencies = [ dependencies = [
"memchr", "memchr",
] ]