Skip to content

Check if an email address exists without sending any email, written in Rust. Comes with a ⚙️ HTTP backend.

chore: Remove AMQP-based worker (#1432)

Amaury89ee166d55b0
diff --git a/.env.example b/.env.example
index a2b2c890..c72e58fa 100644
--- a/.env.example
+++ b/.env.example
@@ -8,8 +8,3 @@
RUST_LOG=reacher=info
SQLX_OFFLINE=1
RCH_WEBDRIVER_ADDR=http://localhost:9515
-
-# To enable bulk email verification, set the value below to 1, and fill out all
-# other env variables below.
-RCH_ENABLE_BULK=0
-DATABASE_URL=postgres://localhost/reacherdb
diff --git a/.vscode/settings.json b/.vscode/settings.json
deleted file mode 100644
index 9f174d01..00000000
--- a/.vscode/settings.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "rust-analyzer.cargo.features": ["worker", "postgres"]
-}
diff --git a/Cargo.lock b/Cargo.lock
index 93f650a9..ec96ebbd 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -17,30 +17,6 @@ version = "1.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe"
-[[package]]
-name = "ahash"
-version = "0.7.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47"
-dependencies = [
- "getrandom",
- "once_cell",
- "version_check",
-]
-
-[[package]]
-name = "ahash"
-version = "0.8.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "91429305e9f0a25f6205c5b8e0d2db09e0708a7a6df0f42212bb56c32c8ac97a"
-dependencies = [
- "cfg-if",
- "getrandom",
- "once_cell",
- "version_check",
- "zerocopy",
-]
-
[[package]]
name = "aho-corasick"
version = "1.0.4"
@@ -50,54 +26,6 @@ dependencies = [
"memchr",
]
-[[package]]
-name = "amq-protocol"
-version = "7.1.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1d40d8b2465c7959dd40cee32ba6ac334b5de57e9fca0cc756759894a4152a5d"
-dependencies = [
- "amq-protocol-tcp",
- "amq-protocol-types",
- "amq-protocol-uri",
- "cookie-factory",
- "nom",
- "serde",
-]
-
-[[package]]
-name = "amq-protocol-tcp"
-version = "7.1.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9cb2100adae7da61953a2c3a01935d86caae13329fadce3333f524d6d6ce12e2"
-dependencies = [
- "amq-protocol-uri",
- "tcp-stream",
- "tracing",
-]
-
-[[package]]
-name = "amq-protocol-types"
-version = "7.1.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "156ff13c8a3ced600b4e54ed826a2ae6242b6069d00dd98466827cef07d3daff"
-dependencies = [
- "cookie-factory",
- "nom",
- "serde",
- "serde_json",
-]
-
-[[package]]
-name = "amq-protocol-uri"
-version = "7.1.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "751bbd7d440576066233e740576f1b31fdc6ab86cfabfbd48c548de77eca73e4"
-dependencies = [
- "amq-protocol-types",
- "percent-encoding",
- "url",
-]
-
[[package]]
name = "android-tzdata"
version = "0.1.1"
@@ -125,108 +53,6 @@ version = "0.9.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "71938f30533e4d95a6d17aa530939da3842c2ab6f4f84b9dae68447e4129f74a"
-[[package]]
-name = "async-channel"
-version = "2.1.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1ca33f4bc4ed1babef42cad36cc1f51fa88be00420404e5b1e80ab1b18f7678c"
-dependencies = [
- "concurrent-queue 2.4.0",
- "event-listener 4.0.0",
- "event-listener-strategy",
- "futures-core",
- "pin-project-lite",
-]
-
-[[package]]
-name = "async-executor"
-version = "1.8.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "17ae5ebefcc48e7452b4987947920dac9450be1110cadf34d1b8c116bdbaf97c"
-dependencies = [
- "async-lock",
- "async-task",
- "concurrent-queue 2.4.0",
- "fastrand 2.0.1",
- "futures-lite 2.2.0",
- "slab",
-]
-
-[[package]]
-name = "async-global-executor"
-version = "2.4.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9b4353121d5644cdf2beb5726ab752e79a8db1ebb52031770ec47db31d245526"
-dependencies = [
- "async-channel",
- "async-executor",
- "async-io 2.2.1",
- "async-lock",
- "blocking",
- "futures-lite 2.2.0",
- "once_cell",
-]
-
-[[package]]
-name = "async-global-executor-trait"
-version = "2.1.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "33dd14c5a15affd2abcff50d84efd4009ada28a860f01c14f9d654f3e81b3f75"
-dependencies = [
- "async-global-executor",
- "async-trait",
- "executor-trait",
-]
-
-[[package]]
-name = "async-io"
-version = "1.7.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e5e18f61464ae81cde0a23e713ae8fd299580c54d697a35820cfd0625b8b0e07"
-dependencies = [
- "concurrent-queue 1.2.4",
- "futures-lite 1.12.0",
- "libc",
- "log",
- "once_cell",
- "parking",
- "polling 2.2.0",
- "slab",
- "socket2 0.4.9",
- "waker-fn",
- "winapi",
-]
-
-[[package]]
-name = "async-io"
-version = "2.2.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d6d3b15875ba253d1110c740755e246537483f152fa334f91abd7fe84c88b3ff"
-dependencies = [
- "async-lock",
- "cfg-if",
- "concurrent-queue 2.4.0",
- "futures-io",
- "futures-lite 2.2.0",
- "parking",
- "polling 3.3.1",
- "rustix 0.38.28",
- "slab",
- "tracing",
- "windows-sys 0.52.0",
-]
-
-[[package]]
-name = "async-lock"
-version = "3.2.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7125e42787d53db9dd54261812ef17e937c95a51e4d291373b670342fa44310c"
-dependencies = [
- "event-listener 4.0.0",
- "event-listener-strategy",
- "pin-project-lite",
-]
-
[[package]]
name = "async-native-tls"
version = "0.4.0"
@@ -239,18 +65,6 @@ dependencies = [
"url",
]
-[[package]]
-name = "async-reactor-trait"
-version = "1.1.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7a6012d170ad00de56c9ee354aef2e358359deb1ec504254e0e5a3774771de0e"
-dependencies = [
- "async-io 1.7.0",
- "async-trait",
- "futures-core",
- "reactor-trait",
-]
-
[[package]]
name = "async-recursion"
version = "1.0.5"
@@ -286,12 +100,6 @@ dependencies = [
"tokio",
]
-[[package]]
-name = "async-task"
-version = "4.5.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b4eb2cdb97421e01129ccb49169d8279ed21e829929144f4a22a6e54ac549ca1"
-
[[package]]
name = "async-trait"
version = "0.1.57"
@@ -303,31 +111,6 @@ dependencies = [
"syn 1.0.109",
]
-[[package]]
-name = "atoi"
-version = "2.0.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f28d99ec8bfea296261ca1af174f24225171fea9664ba9003cbebee704810528"
-dependencies = [
- "num-traits",
-]
-
-[[package]]
-name = "atomic-waker"
-version = "1.1.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0"
-
-[[package]]
-name = "atomic-write-file"
-version = "0.1.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "edcdbedc2236483ab103a53415653d6b4442ea6141baf1ffa85df29635e88436"
-dependencies = [
- "nix",
- "rand",
-]
-
[[package]]
name = "atty"
version = "0.2.14"
@@ -372,12 +155,6 @@ version = "0.21.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a4a4ddaa51a5bc52a6948f74c06d20aaaddb71924eab79b8c97a8c556e942d6a"
-[[package]]
-name = "base64ct"
-version = "1.6.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b"
-
[[package]]
name = "bitflags"
version = "1.3.2"
@@ -389,9 +166,6 @@ name = "bitflags"
version = "2.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07"
-dependencies = [
- "serde",
-]
[[package]]
name = "block-buffer"
@@ -402,31 +176,6 @@ dependencies = [
"generic-array",
]
-[[package]]
-name = "block-padding"
-version = "0.3.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a8894febbff9f758034a5b8e12d87918f56dfc64a8e1fe757d65e29041538d93"
-dependencies = [
- "generic-array",
-]
-
-[[package]]
-name = "blocking"
-version = "1.5.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6a37913e8dc4ddcc604f0c6d3bf2887c995153af3611de9e23c352b44c1b9118"
-dependencies = [
- "async-channel",
- "async-lock",
- "async-task",
- "fastrand 2.0.1",
- "futures-io",
- "futures-lite 2.2.0",
- "piper",
- "tracing",
-]
-
[[package]]
name = "bufstream"
version = "0.1.4"
@@ -451,21 +200,6 @@ version = "1.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ec8a7b6a70fde80372154c65702f00a0f56f3e1c36abbc6c440484be248856db"
-[[package]]
-name = "cache-padded"
-version = "1.2.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c1db59621ec70f09c5e9b597b220c7a2b43611f4710dc03ceb8748637775692c"
-
-[[package]]
-name = "cbc"
-version = "0.1.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "26b52a9543ae338f279b96b0b9fed9c8093744685043739079ce85cd58f289a6"
-dependencies = [
- "cipher",
-]
-
[[package]]
name = "cc"
version = "1.0.83"
@@ -534,17 +268,7 @@ dependencies = [
"num-traits",
"serde",
"wasm-bindgen",
- "windows-targets 0.48.0",
-]
-
-[[package]]
-name = "cipher"
-version = "0.4.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad"
-dependencies = [
- "crypto-common",
- "inout",
+ "windows-targets",
]
[[package]]
@@ -557,7 +281,7 @@ dependencies = [
"bitflags 1.3.2",
"clap_derive",
"clap_lex",
- "indexmap 1.9.1",
+ "indexmap",
"once_cell",
"strsim 0.10.0",
"termcolor",
@@ -586,30 +310,6 @@ dependencies = [
"os_str_bytes",
]
-[[package]]
-name = "concurrent-queue"
-version = "1.2.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "af4780a44ab5696ea9e28294517f1fffb421a83a25af521333c838635509db9c"
-dependencies = [
- "cache-padded",
-]
-
-[[package]]
-name = "concurrent-queue"
-version = "2.4.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d16048cd947b08fa32c24458a22f5dc5e835264f689f4f5653210c69fd107363"
-dependencies = [
- "crossbeam-utils",
-]
-
-[[package]]
-name = "const-oid"
-version = "0.9.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "28c122c3980598d243d63d9a704629a2d748d101f278052ff068be5a4423ab6f"
-
[[package]]
name = "cookie"
version = "0.16.0"
@@ -621,12 +321,6 @@ dependencies = [
"version_check",
]
-[[package]]
-name = "cookie-factory"
-version = "0.3.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "396de984970346b0d9e93d1415082923c679e5ae5c3ee3dcbd104f5610af126b"
-
[[package]]
name = "core-foundation"
version = "0.9.3"
@@ -652,41 +346,6 @@ dependencies = [
"libc",
]
-[[package]]
-name = "crc"
-version = "3.0.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "53757d12b596c16c78b83458d732a5d1a17ab3f53f2f7412f6fb57cc8a140ab3"
-dependencies = [
- "crc-catalog",
-]
-
-[[package]]
-name = "crc-catalog"
-version = "2.1.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2d0165d2900ae6778e36e80bbc4da3b5eefccee9ba939761f9c2882a5d9af3ff"
-
-[[package]]
-name = "crossbeam-queue"
-version = "0.3.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1cd42583b04998a5363558e5f9291ee5a5ff6b49944332103f251e7479a82aa7"
-dependencies = [
- "cfg-if",
- "crossbeam-utils",
-]
-
-[[package]]
-name = "crossbeam-utils"
-version = "0.8.11"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "51887d4adc7b564537b15adcfb307936f8075dfcd5f00dde9a9f1d29383682bc"
-dependencies = [
- "cfg-if",
- "once_cell",
-]
-
[[package]]
name = "crypto-common"
version = "0.1.6"
@@ -745,18 +404,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d6ee87af31d84ef885378aebca32be3d682b0e0dc119d5b4860a2c5bb5046730"
dependencies = [
"serde",
- "uuid 0.8.2",
-]
-
-[[package]]
-name = "der"
-version = "0.7.8"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fffa369a668c8af7dbf8b5e56c9f744fbd399949ed171606040001947de40b1c"
-dependencies = [
- "const-oid",
- "pem-rfc7468",
- "zeroize",
+ "uuid",
]
[[package]]
@@ -784,15 +432,6 @@ dependencies = [
"syn 1.0.109",
]
-[[package]]
-name = "des"
-version = "0.8.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ffdd80ce8ce993de27e9f063a444a4d53ce8e8db4c1f00cc03af5ad5a9867a1e"
-dependencies = [
- "cipher",
-]
-
[[package]]
name = "digest"
version = "0.10.7"
@@ -800,37 +439,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292"
dependencies = [
"block-buffer",
- "const-oid",
"crypto-common",
- "subtle",
]
-[[package]]
-name = "doc-comment"
-version = "0.3.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10"
-
[[package]]
name = "dotenv"
version = "0.15.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "77c90badedccf4105eca100756a0b1289e191f6fcbdadd3cee1d2f614f97da8f"
-[[package]]
-name = "dotenvy"
-version = "0.15.7"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1aaf95b3e5c8f23aa320147307562d361db0ae0d51242340f558153b4eb2439b"
-
[[package]]
name = "either"
version = "1.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3f107b87b6afc2a64fd13cac55fe06d6c8859f12d4b14cbcdd2c67d0976781be"
-dependencies = [
- "serde",
-]
[[package]]
name = "encoding_rs"
@@ -866,12 +488,6 @@ dependencies = [
"termcolor",
]
-[[package]]
-name = "equivalent"
-version = "1.0.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5"
-
[[package]]
name = "errno"
version = "0.2.8"
@@ -883,16 +499,6 @@ dependencies = [
"winapi",
]
-[[package]]
-name = "errno"
-version = "0.3.8"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245"
-dependencies = [
- "libc",
- "windows-sys 0.52.0",
-]
-
[[package]]
name = "errno-dragonfly"
version = "0.1.2"
@@ -904,77 +510,30 @@ dependencies = [
]
[[package]]
-name = "etcetera"
-version = "0.8.0"
+name = "fantoccini"
+version = "0.19.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "136d1b5283a1ab77bd9257427ffd09d8667ced0570b6f938942bc7568ed5b943"
+checksum = "65f0fbe245d714b596ba5802b46f937f5ce68dcae0f32f9a70b5c3b04d3c6f64"
dependencies = [
- "cfg-if",
- "home",
- "windows-sys 0.48.0",
+ "base64 0.13.0",
+ "cookie",
+ "futures-core",
+ "futures-util",
+ "http",
+ "hyper",
+ "hyper-tls",
+ "mime",
+ "serde",
+ "serde_json",
+ "time",
+ "tokio",
+ "url",
+ "webdriver",
]
[[package]]
-name = "event-listener"
-version = "2.5.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0"
-
-[[package]]
-name = "event-listener"
-version = "4.0.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "770d968249b5d99410d61f5bf89057f3199a077a04d087092f58e7d10692baae"
-dependencies = [
- "concurrent-queue 2.4.0",
- "parking",
- "pin-project-lite",
-]
-
-[[package]]
-name = "event-listener-strategy"
-version = "0.4.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "958e4d70b6d5e81971bebec42271ec641e7ff4e170a6fa605f2b8a8b65cb97d3"
-dependencies = [
- "event-listener 4.0.0",
- "pin-project-lite",
-]
-
-[[package]]
-name = "executor-trait"
-version = "2.1.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1a1052dd43212a7777ec6a69b117da52f5e52f07aec47d00c1a2b33b85d06b08"
-dependencies = [
- "async-trait",
-]
-
-[[package]]
-name = "fantoccini"
-version = "0.19.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "65f0fbe245d714b596ba5802b46f937f5ce68dcae0f32f9a70b5c3b04d3c6f64"
-dependencies = [
- "base64 0.13.0",
- "cookie",
- "futures-core",
- "futures-util",
- "http",
- "hyper",
- "hyper-tls",
- "mime",
- "serde",
- "serde_json",
- "time",
- "tokio",
- "url",
- "webdriver",
-]
-
-[[package]]
-name = "fast-socks5"
-version = "0.8.2"
+name = "fast-socks5"
+version = "0.8.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "961ce1761191c157145a8c9f0c3ceabecd3a729d65c9a8d443674eaee3420f7e"
dependencies = [
@@ -1017,35 +576,6 @@ dependencies = [
"instant",
]
-[[package]]
-name = "fastrand"
-version = "2.0.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5"
-
-[[package]]
-name = "flume"
-version = "0.10.14"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1657b4441c3403d9f7b3409e47575237dac27b1b5726df654a6ecbf92f0f7577"
-dependencies = [
- "futures-core",
- "futures-sink",
- "pin-project",
- "spin 0.9.8",
-]
-
-[[package]]
-name = "flume"
-version = "0.11.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "55ac459de2512911e4b674ce33cf20befaba382d05b62b008afc1c8b57cbf181"
-dependencies = [
- "futures-core",
- "futures-sink",
- "spin 0.9.8",
-]
-
[[package]]
name = "fnv"
version = "1.0.7"
@@ -1118,51 +648,12 @@ dependencies = [
"futures-util",
]
-[[package]]
-name = "futures-intrusive"
-version = "0.5.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1d930c203dd0b6ff06e0201a4a2fe9149b43c684fd4420555b26d21b1a02956f"
-dependencies = [
- "futures-core",
- "lock_api",
- "parking_lot",
-]
-
[[package]]
name = "futures-io"
version = "0.3.30"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1"
-[[package]]
-name = "futures-lite"
-version = "1.12.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7694489acd39452c77daa48516b894c153f192c3578d5a839b62c58099fcbf48"
-dependencies = [
- "fastrand 1.8.0",
- "futures-core",
- "futures-io",
- "memchr",
- "parking",
- "pin-project-lite",
- "waker-fn",
-]
-
-[[package]]
-name = "futures-lite"
-version = "2.2.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "445ba825b27408685aaecefd65178908c36c6e96aaf6d8599419d46e624192ba"
-dependencies = [
- "fastrand 2.0.1",
- "futures-core",
- "futures-io",
- "parking",
- "pin-project-lite",
-]
-
[[package]]
name = "futures-macro"
version = "0.3.30"
@@ -1243,7 +734,7 @@ dependencies = [
"futures-sink",
"futures-util",
"http",
- "indexmap 1.9.1",
+ "indexmap",
"slab",
"tokio",
"tokio-util",
@@ -1255,24 +746,6 @@ name = "hashbrown"
version = "0.12.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888"
-dependencies = [
- "ahash 0.7.6",
-]
-
-[[package]]
-name = "hashbrown"
-version = "0.14.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604"
-
-[[package]]
-name = "hashlink"
-version = "0.8.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d452c155cb93fecdfb02a73dd57b5d8e442c2063bd7aac72f1bc5e4263a43086"
-dependencies = [
- "hashbrown 0.12.3",
-]
[[package]]
name = "headers"
@@ -1304,9 +777,6 @@ name = "heck"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2540771e65fc8cb83cd6e8a237f70c319bd5c29f78ed1084ba5d50eeac86f7f9"
-dependencies = [
- "unicode-segmentation",
-]
[[package]]
name = "hermit-abi"
@@ -1326,12 +796,6 @@ dependencies = [
"libc",
]
-[[package]]
-name = "hex"
-version = "0.4.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70"
-
[[package]]
name = "hickory-proto"
version = "0.24.0"
@@ -1377,33 +841,6 @@ dependencies = [
"tracing",
]
-[[package]]
-name = "hkdf"
-version = "0.12.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "791a029f6b9fc27657f6f188ec6e5e43f6911f6f878e0dc5501396e09809d437"
-dependencies = [
- "hmac",
-]
-
-[[package]]
-name = "hmac"
-version = "0.12.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e"
-dependencies = [
- "digest",
-]
-
-[[package]]
-name = "home"
-version = "0.5.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5444c27eef6923071f7ebcc33e3444508466a76f7a2b93da00ed6e19f30c1ddb"
-dependencies = [
- "windows-sys 0.48.0",
-]
-
[[package]]
name = "hostname"
version = "0.3.1"
@@ -1548,27 +985,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "10a35a97730320ffe8e2d410b5d3b69279b98d2c14bdb8b70ea89ecf7888d41e"
dependencies = [
"autocfg",
- "hashbrown 0.12.3",
-]
-
-[[package]]
-name = "indexmap"
-version = "2.1.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f"
-dependencies = [
- "equivalent",
- "hashbrown 0.14.3",
-]
-
-[[package]]
-name = "inout"
-version = "0.1.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5"
-dependencies = [
- "block-padding",
- "generic-array",
+ "hashbrown",
]
[[package]]
@@ -1616,19 +1033,10 @@ checksum = "aae5bc6e2eb41c9def29a3e0f1306382807764b9b53112030eff57435667352d"
dependencies = [
"hermit-abi 0.2.6",
"io-lifetimes",
- "rustix 0.36.3",
+ "rustix",
"windows-sys 0.42.0",
]
-[[package]]
-name = "itertools"
-version = "0.10.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a9a9d19fa1e79b6215ff29b9d6880b706147f16e9b1dbb1e4e5947b5b02bc5e3"
-dependencies = [
- "either",
-]
-
[[package]]
name = "itoa"
version = "1.0.3"
@@ -1644,36 +1052,11 @@ dependencies = [
"wasm-bindgen",
]
-[[package]]
-name = "lapin"
-version = "2.3.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5f3067a1fcfbc3fc46455809c023e69b8f6602463201010f4ae5a3b572adb9dc"
-dependencies = [
- "amq-protocol",
- "async-global-executor-trait",
- "async-reactor-trait",
- "async-trait",
- "executor-trait",
- "flume 0.10.14",
- "futures-core",
- "futures-io",
- "parking_lot",
- "pinky-swear",
- "reactor-trait",
- "serde",
- "tracing",
- "waker-fn",
-]
-
[[package]]
name = "lazy_static"
version = "1.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
-dependencies = [
- "spin 0.5.2",
-]
[[package]]
name = "levenshtein"
@@ -1687,23 +1070,6 @@ version = "0.2.150"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "89d92a4743f9a61002fae18374ed11e7973f530cb3a3255fb354818118b2203c"
-[[package]]
-name = "libm"
-version = "0.2.8"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058"
-
-[[package]]
-name = "libsqlite3-sys"
-version = "0.27.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cf4e226dcd58b4be396f7bd3c20da8fdee2911400705297ba7d2d7cc2c30f716"
-dependencies = [
- "cc",
- "pkg-config",
- "vcpkg",
-]
-
[[package]]
name = "linked-hash-map"
version = "0.5.6"
@@ -1716,12 +1082,6 @@ version = "0.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8f9f08d8963a6c613f4b1a78f4f4a4dbfadf8e6545b2d72861731e4858b8b47f"
-[[package]]
-name = "linux-raw-sys"
-version = "0.4.12"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c4cd1a83af159aa67994778be9070f0ae1bd732942279cabb14f86f986a21456"
-
[[package]]
name = "lock_api"
version = "0.4.7"
@@ -1763,15 +1123,6 @@ version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ffbee8634e0d45d258acb448e7eaab3fce7a0a467395d4d9f228e3c1f01fb2e4"
-[[package]]
-name = "md-5"
-version = "0.10.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "658646b21e0b72f7866c7038ab086d3d5e1cd6271f060fd37defb241949d0582"
-dependencies = [
- "digest",
-]
-
[[package]]
name = "md5"
version = "0.7.0"
@@ -1840,7 +1191,7 @@ dependencies = [
"log",
"memchr",
"mime",
- "spin 0.9.8",
+ "spin",
"version_check",
]
@@ -1862,17 +1213,6 @@ dependencies = [
"tempfile",
]
-[[package]]
-name = "nix"
-version = "0.27.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2eb04e9c688eff1c89d72b407f168cf79bb9e867a9d3323ed6c01519eb9cc053"
-dependencies = [
- "bitflags 2.4.1",
- "cfg-if",
- "libc",
-]
-
[[package]]
name = "nom"
version = "7.1.1"
@@ -1893,44 +1233,6 @@ dependencies = [
"winapi",
]
-[[package]]
-name = "num-bigint-dig"
-version = "0.8.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "dc84195820f291c7697304f3cbdadd1cb7199c0efc917ff5eafd71225c136151"
-dependencies = [
- "byteorder",
- "lazy_static",
- "libm",
- "num-integer",
- "num-iter",
- "num-traits",
- "rand",
- "smallvec",
- "zeroize",
-]
-
-[[package]]
-name = "num-integer"
-version = "0.1.45"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9"
-dependencies = [
- "autocfg",
- "num-traits",
-]
-
-[[package]]
-name = "num-iter"
-version = "0.1.43"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7d03e6c028c5dc5cac6e2dec0efda81fc887605bb3d884578bb6d6bf7514e252"
-dependencies = [
- "autocfg",
- "num-integer",
- "num-traits",
-]
-
[[package]]
name = "num-traits"
version = "0.2.15"
@@ -1938,7 +1240,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd"
dependencies = [
"autocfg",
- "libm",
]
[[package]]
@@ -2041,29 +1342,6 @@ version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39"
-[[package]]
-name = "p12"
-version = "0.6.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d4873306de53fe82e7e484df31e1e947d61514b6ea2ed6cd7b45d63006fd9224"
-dependencies = [
- "cbc",
- "cipher",
- "des",
- "getrandom",
- "hmac",
- "lazy_static",
- "rc2",
- "sha1 0.10.4",
- "yasna",
-]
-
-[[package]]
-name = "parking"
-version = "2.2.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bb813b8af86854136c6922af0598d719255ecb2179515e6e7730d468f05c9cae"
-
[[package]]
name = "parking_lot"
version = "0.12.1"
@@ -2087,21 +1365,6 @@ dependencies = [
"windows-sys 0.36.1",
]
-[[package]]
-name = "paste"
-version = "1.0.8"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9423e2b32f7a043629287a536f21951e8c6a82482d0acb1eeebfc90bc2225b22"
-
-[[package]]
-name = "pem-rfc7468"
-version = "0.7.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "88b39c9bfcfc231068454382784bb460aae594343fb030d46e9f50a645418412"
-dependencies = [
- "base64ct",
-]
-
[[package]]
name = "percent-encoding"
version = "2.3.1"
@@ -2141,93 +1404,22 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184"
[[package]]
-name = "pinky-swear"
-version = "6.2.0"
+name = "pkg-config"
+version = "0.3.25"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6cfae3ead413ca051a681152bd266438d3bfa301c9bdf836939a14c721bb2a21"
-dependencies = [
- "doc-comment",
- "flume 0.11.0",
- "parking_lot",
- "tracing",
-]
+checksum = "1df8c4ec4b0627e53bdf214615ad287367e482558cf84b109250b37464dc03ae"
[[package]]
-name = "piper"
-version = "0.2.1"
+name = "ppv-lite86"
+version = "0.2.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "668d31b1c4eba19242f2088b2bf3316b82ca31082a8335764db4e083db7485d4"
-dependencies = [
- "atomic-waker",
- "fastrand 2.0.1",
- "futures-io",
-]
+checksum = "eb9f9e6e233e5c4a35559a617bf40a4ec447db2e84c20b55a6f83167b7e57872"
[[package]]
-name = "pkcs1"
-version = "0.7.5"
+name = "proc-macro-error"
+version = "1.0.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c8ffb9f10fa047879315e6625af03c164b16962a5368d724ed16323b68ace47f"
-dependencies = [
- "der",
- "pkcs8",
- "spki",
-]
-
-[[package]]
-name = "pkcs8"
-version = "0.10.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7"
-dependencies = [
- "der",
- "spki",
-]
-
-[[package]]
-name = "pkg-config"
-version = "0.3.25"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1df8c4ec4b0627e53bdf214615ad287367e482558cf84b109250b37464dc03ae"
-
-[[package]]
-name = "polling"
-version = "2.2.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "685404d509889fade3e86fe3a5803bca2ec09b0c0778d5ada6ec8bf7a8de5259"
-dependencies = [
- "cfg-if",
- "libc",
- "log",
- "wepoll-ffi",
- "winapi",
-]
-
-[[package]]
-name = "polling"
-version = "3.3.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cf63fa624ab313c11656b4cda960bfc46c410187ad493c41f6ba2d8c1e991c9e"
-dependencies = [
- "cfg-if",
- "concurrent-queue 2.4.0",
- "pin-project-lite",
- "rustix 0.38.28",
- "tracing",
- "windows-sys 0.52.0",
-]
-
-[[package]]
-name = "ppv-lite86"
-version = "0.2.16"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "eb9f9e6e233e5c4a35559a617bf40a4ec447db2e84c20b55a6f83167b7e57872"
-
-[[package]]
-name = "proc-macro-error"
-version = "1.0.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c"
+checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c"
dependencies = [
"proc-macro-error-attr",
"proc-macro2",
@@ -2316,15 +1508,6 @@ dependencies = [
"getrandom",
]
-[[package]]
-name = "rc2"
-version = "0.8.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "62c64daa8e9438b84aaae55010a93f396f8e60e3911590fcba770d04643fc1dd"
-dependencies = [
- "cipher",
-]
-
[[package]]
name = "reacher_backend"
version = "0.5.0"
@@ -2332,34 +1515,16 @@ dependencies = [
"async-smtp",
"check-if-email-exists",
"dotenv",
- "futures",
- "futures-lite 2.2.0",
- "lapin",
"openssl",
- "reqwest",
"sentry",
"serde",
"serde_json",
- "sqlx",
"tokio",
- "tokio-executor-trait",
- "tokio-reactor-trait",
"tracing",
"tracing-subscriber",
"warp",
]
-[[package]]
-name = "reactor-trait"
-version = "1.1.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "438a4293e4d097556730f4711998189416232f009c137389e0f961d2bc0ddc58"
-dependencies = [
- "async-trait",
- "futures-core",
- "futures-io",
-]
-
[[package]]
name = "redox_syscall"
version = "0.2.16"
@@ -2456,41 +1621,6 @@ dependencies = [
"quick-error",
]
-[[package]]
-name = "ring"
-version = "0.16.20"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc"
-dependencies = [
- "cc",
- "libc",
- "once_cell",
- "spin 0.5.2",
- "untrusted",
- "web-sys",
- "winapi",
-]
-
-[[package]]
-name = "rsa"
-version = "0.9.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5d0e5124fcb30e76a7e79bfee683a2746db83784b86289f6251b54b7950a0dfc"
-dependencies = [
- "const-oid",
- "digest",
- "num-bigint-dig",
- "num-integer",
- "num-traits",
- "pkcs1",
- "pkcs8",
- "rand_core",
- "signature",
- "spki",
- "subtle",
- "zeroize",
-]
-
[[package]]
name = "rustc-demangle"
version = "0.1.21"
@@ -2513,62 +1643,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0b1fbb4dfc4eb1d390c02df47760bb19a84bb80b301ecc947ab5406394d8223e"
dependencies = [
"bitflags 1.3.2",
- "errno 0.2.8",
+ "errno",
"io-lifetimes",
"libc",
- "linux-raw-sys 0.1.3",
+ "linux-raw-sys",
"windows-sys 0.42.0",
]
-[[package]]
-name = "rustix"
-version = "0.38.28"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "72e572a5e8ca657d7366229cdde4bd14c4eb5499a9573d4d366fe1b599daa316"
-dependencies = [
- "bitflags 2.4.1",
- "errno 0.3.8",
- "libc",
- "linux-raw-sys 0.4.12",
- "windows-sys 0.52.0",
-]
-
-[[package]]
-name = "rustls"
-version = "0.21.7"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cd8d6c9f025a446bc4d18ad9632e69aec8f287aa84499ee335599fabd20c3fd8"
-dependencies = [
- "log",
- "ring",
- "rustls-webpki",
- "sct",
-]
-
-[[package]]
-name = "rustls-connector"
-version = "0.18.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "25da151615461c7347114b1ad1a7458b4cdebc69cb220cd140cd5cb324b1dd37"
-dependencies = [
- "log",
- "rustls",
- "rustls-native-certs",
- "rustls-webpki",
-]
-
-[[package]]
-name = "rustls-native-certs"
-version = "0.6.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a9aace74cb666635c918e9c12bc0d348266037aa8eb599b5cba565709a8dff00"
-dependencies = [
- "openssl-probe",
- "rustls-pemfile",
- "schannel",
- "security-framework",
-]
-
[[package]]
name = "rustls-pemfile"
version = "1.0.2"
@@ -2578,16 +1659,6 @@ dependencies = [
"base64 0.21.0",
]
-[[package]]
-name = "rustls-webpki"
-version = "0.101.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3c7d5dece342910d9ba34d259310cae3e0154b873b35408b787b59bce53d34fe"
-dependencies = [
- "ring",
- "untrusted",
-]
-
[[package]]
name = "ryu"
version = "1.0.11"
@@ -2616,16 +1687,6 @@ version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd"
-[[package]]
-name = "sct"
-version = "0.7.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d53dcdb7c9f8158937a7981b48accfd39a43af418591a5d008c7b22b5e1b7ca4"
-dependencies = [
- "ring",
- "untrusted",
-]
-
[[package]]
name = "security-framework"
version = "2.6.1"
@@ -2733,7 +1794,7 @@ dependencies = [
"serde_json",
"thiserror",
"url",
- "uuid 0.8.2",
+ "uuid",
]
[[package]]
@@ -2773,366 +1834,99 @@ version = "0.7.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd"
dependencies = [
- "form_urlencoded",
- "itoa",
- "ryu",
- "serde",
-]
-
-[[package]]
-name = "sha-1"
-version = "0.10.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "028f48d513f9678cda28f6e4064755b3fbb2af6acd672f2c209b62323f7aea0f"
-dependencies = [
- "cfg-if",
- "cpufeatures",
- "digest",
-]
-
-[[package]]
-name = "sha1"
-version = "0.6.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c1da05c97445caa12d05e848c4a4fcbbea29e748ac28f7e80e9b010392063770"
-dependencies = [
- "sha1_smol",
-]
-
-[[package]]
-name = "sha1"
-version = "0.10.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "006769ba83e921b3085caa8334186b00cf92b4cb1a6cf4632fbccc8eff5c7549"
-dependencies = [
- "cfg-if",
- "cpufeatures",
- "digest",
-]
-
-[[package]]
-name = "sha1_smol"
-version = "1.0.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ae1a47186c03a32177042e55dbc5fd5aee900b8e0069a8d70fba96a9375cd012"
-
-[[package]]
-name = "sha2"
-version = "0.10.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "55deaec60f81eefe3cce0dc50bda92d6d8e88f2a27df7c5033b42afeb1ed2676"
-dependencies = [
- "cfg-if",
- "cpufeatures",
- "digest",
-]
-
-[[package]]
-name = "sharded-slab"
-version = "0.1.7"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6"
-dependencies = [
- "lazy_static",
-]
-
-[[package]]
-name = "signature"
-version = "2.2.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de"
-dependencies = [
- "digest",
- "rand_core",
-]
-
-[[package]]
-name = "slab"
-version = "0.4.7"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4614a76b2a8be0058caa9dbbaf66d988527d86d003c11a94fbd335d7661edcef"
-dependencies = [
- "autocfg",
-]
-
-[[package]]
-name = "smallvec"
-version = "1.11.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4dccd0940a2dcdf68d092b8cbab7dc0ad8fa938bf95787e1b916b0e3d0e8e970"
-
-[[package]]
-name = "socket2"
-version = "0.4.9"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "64a4a911eed85daf18834cfaa86a79b7d266ff93ff5ba14005426219480ed662"
-dependencies = [
- "libc",
- "winapi",
-]
-
-[[package]]
-name = "socket2"
-version = "0.5.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7b5fac59a5cb5dd637972e5fca70daf0523c9067fcdc4842f053dae04a18f8e9"
-dependencies = [
- "libc",
- "windows-sys 0.48.0",
-]
-
-[[package]]
-name = "spin"
-version = "0.5.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d"
-
-[[package]]
-name = "spin"
-version = "0.9.8"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67"
-dependencies = [
- "lock_api",
-]
-
-[[package]]
-name = "spki"
-version = "0.7.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d"
-dependencies = [
- "base64ct",
- "der",
-]
-
-[[package]]
-name = "sqlformat"
-version = "0.2.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f87e292b4291f154971a43c3774364e2cbcaec599d3f5bf6fa9d122885dbc38a"
-dependencies = [
- "itertools",
- "nom",
- "unicode_categories",
-]
-
-[[package]]
-name = "sqlx"
-version = "0.7.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "dba03c279da73694ef99763320dea58b51095dfe87d001b1d4b5fe78ba8763cf"
-dependencies = [
- "sqlx-core",
- "sqlx-macros",
- "sqlx-mysql",
- "sqlx-postgres",
- "sqlx-sqlite",
-]
-
-[[package]]
-name = "sqlx-core"
-version = "0.7.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d84b0a3c3739e220d94b3239fd69fb1f74bc36e16643423bd99de3b43c21bfbd"
-dependencies = [
- "ahash 0.8.6",
- "atoi",
- "byteorder",
- "bytes",
- "chrono",
- "crc",
- "crossbeam-queue",
- "dotenvy",
- "either",
- "event-listener 2.5.3",
- "futures-channel",
- "futures-core",
- "futures-intrusive",
- "futures-io",
- "futures-util",
- "hashlink",
- "hex",
- "indexmap 2.1.0",
- "log",
- "memchr",
- "native-tls",
- "once_cell",
- "paste",
- "percent-encoding",
- "serde",
- "serde_json",
- "sha2",
- "smallvec",
- "sqlformat",
- "thiserror",
- "tokio",
- "tokio-stream",
- "tracing",
- "url",
- "uuid 1.6.1",
+ "form_urlencoded",
+ "itoa",
+ "ryu",
+ "serde",
]
[[package]]
-name = "sqlx-macros"
-version = "0.7.3"
+name = "sha-1"
+version = "0.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "89961c00dc4d7dffb7aee214964b065072bff69e36ddb9e2c107541f75e4f2a5"
+checksum = "028f48d513f9678cda28f6e4064755b3fbb2af6acd672f2c209b62323f7aea0f"
dependencies = [
- "proc-macro2",
- "quote",
- "sqlx-core",
- "sqlx-macros-core",
- "syn 1.0.109",
+ "cfg-if",
+ "cpufeatures",
+ "digest",
]
[[package]]
-name = "sqlx-macros-core"
-version = "0.7.3"
+name = "sha1"
+version = "0.6.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d0bd4519486723648186a08785143599760f7cc81c52334a55d6a83ea1e20841"
+checksum = "c1da05c97445caa12d05e848c4a4fcbbea29e748ac28f7e80e9b010392063770"
dependencies = [
- "atomic-write-file",
- "dotenvy",
- "either",
- "heck",
- "hex",
- "once_cell",
- "proc-macro2",
- "quote",
- "serde",
- "serde_json",
- "sha2",
- "sqlx-core",
- "sqlx-mysql",
- "sqlx-postgres",
- "sqlx-sqlite",
- "syn 1.0.109",
- "tempfile",
- "tokio",
- "url",
+ "sha1_smol",
]
[[package]]
-name = "sqlx-mysql"
-version = "0.7.3"
+name = "sha1"
+version = "0.10.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e37195395df71fd068f6e2082247891bc11e3289624bbc776a0cdfa1ca7f1ea4"
+checksum = "006769ba83e921b3085caa8334186b00cf92b4cb1a6cf4632fbccc8eff5c7549"
dependencies = [
- "atoi",
- "base64 0.21.0",
- "bitflags 2.4.1",
- "byteorder",
- "bytes",
- "chrono",
- "crc",
+ "cfg-if",
+ "cpufeatures",
"digest",
- "dotenvy",
- "either",
- "futures-channel",
- "futures-core",
- "futures-io",
- "futures-util",
- "generic-array",
- "hex",
- "hkdf",
- "hmac",
- "itoa",
- "log",
- "md-5",
- "memchr",
- "once_cell",
- "percent-encoding",
- "rand",
- "rsa",
- "serde",
- "sha1 0.10.4",
- "sha2",
- "smallvec",
- "sqlx-core",
- "stringprep",
- "thiserror",
- "tracing",
- "uuid 1.6.1",
- "whoami",
]
[[package]]
-name = "sqlx-postgres"
-version = "0.7.3"
+name = "sha1_smol"
+version = "1.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ae1a47186c03a32177042e55dbc5fd5aee900b8e0069a8d70fba96a9375cd012"
+
+[[package]]
+name = "sharded-slab"
+version = "0.1.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d6ac0ac3b7ccd10cc96c7ab29791a7dd236bd94021f31eec7ba3d46a74aa1c24"
+checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6"
dependencies = [
- "atoi",
- "base64 0.21.0",
- "bitflags 2.4.1",
- "byteorder",
- "chrono",
- "crc",
- "dotenvy",
- "etcetera",
- "futures-channel",
- "futures-core",
- "futures-io",
- "futures-util",
- "hex",
- "hkdf",
- "hmac",
- "home",
- "itoa",
- "log",
- "md-5",
- "memchr",
- "once_cell",
- "rand",
- "serde",
- "serde_json",
- "sha1 0.10.4",
- "sha2",
- "smallvec",
- "sqlx-core",
- "stringprep",
- "thiserror",
- "tracing",
- "uuid 1.6.1",
- "whoami",
+ "lazy_static",
]
[[package]]
-name = "sqlx-sqlite"
-version = "0.7.3"
+name = "slab"
+version = "0.4.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "210976b7d948c7ba9fced8ca835b11cbb2d677c59c79de41ac0d397e14547490"
+checksum = "4614a76b2a8be0058caa9dbbaf66d988527d86d003c11a94fbd335d7661edcef"
dependencies = [
- "atoi",
- "chrono",
- "flume 0.11.0",
- "futures-channel",
- "futures-core",
- "futures-executor",
- "futures-intrusive",
- "futures-util",
- "libsqlite3-sys",
- "log",
- "percent-encoding",
- "serde",
- "sqlx-core",
- "tracing",
- "url",
- "urlencoding",
- "uuid 1.6.1",
+ "autocfg",
]
[[package]]
-name = "stringprep"
-version = "0.1.2"
+name = "smallvec"
+version = "1.11.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4dccd0940a2dcdf68d092b8cbab7dc0ad8fa938bf95787e1b916b0e3d0e8e970"
+
+[[package]]
+name = "socket2"
+version = "0.4.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8ee348cb74b87454fff4b551cbf727025810a004f88aeacae7f85b87f4e9a1c1"
+checksum = "64a4a911eed85daf18834cfaa86a79b7d266ff93ff5ba14005426219480ed662"
dependencies = [
- "unicode-bidi",
- "unicode-normalization",
+ "libc",
+ "winapi",
+]
+
+[[package]]
+name = "socket2"
+version = "0.5.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7b5fac59a5cb5dd637972e5fca70daf0523c9067fcdc4842f053dae04a18f8e9"
+dependencies = [
+ "libc",
+ "windows-sys 0.48.0",
]
+[[package]]
+name = "spin"
+version = "0.9.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67"
+
[[package]]
name = "strsim"
version = "0.9.3"
@@ -3145,12 +1939,6 @@ version = "0.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623"
-[[package]]
-name = "subtle"
-version = "2.4.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601"
-
[[package]]
name = "syn"
version = "1.0.109"
@@ -3194,18 +1982,6 @@ dependencies = [
"libc",
]
-[[package]]
-name = "tcp-stream"
-version = "0.26.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4da30af7998f51ee1aa48ab24276fe303a697b004e31ff542b192c088d5630a5"
-dependencies = [
- "cfg-if",
- "p12",
- "rustls-connector",
- "rustls-pemfile",
-]
-
[[package]]
name = "tempfile"
version = "3.3.0"
@@ -3213,7 +1989,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5cdb1ef4eaeeaddc8fbd371e5017057064af0911902ef36b39801f67cc6d79e4"
dependencies = [
"cfg-if",
- "fastrand 1.8.0",
+ "fastrand",
"libc",
"redox_syscall",
"remove_dir_all",
@@ -3315,17 +2091,6 @@ dependencies = [
"windows-sys 0.48.0",
]
-[[package]]
-name = "tokio-executor-trait"
-version = "2.1.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "802ccf58e108fe16561f35348fabe15ff38218968f033d587e399a84937533cc"
-dependencies = [
- "async-trait",
- "executor-trait",
- "tokio",
-]
-
[[package]]
name = "tokio-macros"
version = "2.2.0"
@@ -3347,20 +2112,6 @@ dependencies = [
"tokio",
]
-[[package]]
-name = "tokio-reactor-trait"
-version = "1.1.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e9481a72f36bd9cbb8d6dd349227c4783e234e4332cfe806225bc929c4b92486"
-dependencies = [
- "async-trait",
- "futures-core",
- "futures-io",
- "reactor-trait",
- "tokio",
- "tokio-stream",
-]
-
[[package]]
name = "tokio-socks"
version = "0.5.1"
@@ -3550,18 +2301,6 @@ version = "1.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7e8820f5d777f6224dc4be3632222971ac30164d4a258d595640799554ebfd99"
-[[package]]
-name = "unicode_categories"
-version = "0.1.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "39ec24b3121d976906ece63c9daad25b85969647682eee313cb5779fdd69e14e"
-
-[[package]]
-name = "untrusted"
-version = "0.7.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a"
-
[[package]]
name = "url"
version = "2.5.0"
@@ -3574,12 +2313,6 @@ dependencies = [
"serde",
]
-[[package]]
-name = "urlencoding"
-version = "2.1.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "daf8dba3b7eb870caf1ddeed7bc9d2a049f3cfdfae7cb521b087cc33ae4c49da"
-
[[package]]
name = "utf-8"
version = "0.7.6"
@@ -3596,12 +2329,6 @@ dependencies = [
"serde",
]
-[[package]]
-name = "uuid"
-version = "1.6.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5e395fcf16a7a3d8127ec99782007af141946b4795001f876d54fb0d55978560"
-
[[package]]
name = "valuable"
version = "0.1.0"
@@ -3620,12 +2347,6 @@ version = "0.9.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f"
-[[package]]
-name = "waker-fn"
-version = "1.1.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9d5b2c62b4012a3e1eca5a7e077d13b3bf498c4073e33ccd58626607748ceeca"
-
[[package]]
name = "want"
version = "0.3.0"
@@ -3768,25 +2489,6 @@ dependencies = [
"url",
]
-[[package]]
-name = "wepoll-ffi"
-version = "0.1.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d743fdedc5c64377b5fc2bc036b01c7fd642205a0d96356034ae3404d49eb7fb"
-dependencies = [
- "cc",
-]
-
-[[package]]
-name = "whoami"
-version = "1.2.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "524b58fa5a20a2fb3014dd6358b70e6579692a56ef6fce928834e488f42f65e8"
-dependencies = [
- "wasm-bindgen",
- "web-sys",
-]
-
[[package]]
name = "widestring"
version = "0.5.1"
@@ -3830,7 +2532,7 @@ version = "0.50.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "af6041b3f84485c21b57acdc0fee4f4f0c93f426053dc05fa5d6fc262537bbff"
dependencies = [
- "windows-targets 0.48.0",
+ "windows-targets",
]
[[package]]
@@ -3867,16 +2569,7 @@ version = "0.48.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9"
dependencies = [
- "windows-targets 0.48.0",
-]
-
-[[package]]
-name = "windows-sys"
-version = "0.52.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d"
-dependencies = [
- "windows-targets 0.52.0",
+ "windows-targets",
]
[[package]]
@@ -3894,21 +2587,6 @@ dependencies = [
"windows_x86_64_msvc 0.48.0",
]
-[[package]]
-name = "windows-targets"
-version = "0.52.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8a18201040b24831fbb9e4eb208f8892e1f50a37feb53cc7ff887feb8f50e7cd"
-dependencies = [
- "windows_aarch64_gnullvm 0.52.0",
- "windows_aarch64_msvc 0.52.0",
- "windows_i686_gnu 0.52.0",
- "windows_i686_msvc 0.52.0",
- "windows_x86_64_gnu 0.52.0",
- "windows_x86_64_gnullvm 0.52.0",
- "windows_x86_64_msvc 0.52.0",
-]
-
[[package]]
name = "windows_aarch64_gnullvm"
version = "0.42.1"
@@ -3921,12 +2599,6 @@ version = "0.48.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc"
-[[package]]
-name = "windows_aarch64_gnullvm"
-version = "0.52.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea"
-
[[package]]
name = "windows_aarch64_msvc"
version = "0.36.1"
@@ -3945,12 +2617,6 @@ version = "0.48.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3"
-[[package]]
-name = "windows_aarch64_msvc"
-version = "0.52.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef"
-
[[package]]
name = "windows_i686_gnu"
version = "0.36.1"
@@ -3969,12 +2635,6 @@ version = "0.48.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241"
-[[package]]
-name = "windows_i686_gnu"
-version = "0.52.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313"
-
[[package]]
name = "windows_i686_msvc"
version = "0.36.1"
@@ -3993,12 +2653,6 @@ version = "0.48.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00"
-[[package]]
-name = "windows_i686_msvc"
-version = "0.52.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a"
-
[[package]]
name = "windows_x86_64_gnu"
version = "0.36.1"
@@ -4017,12 +2671,6 @@ version = "0.48.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1"
-[[package]]
-name = "windows_x86_64_gnu"
-version = "0.52.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd"
-
[[package]]
name = "windows_x86_64_gnullvm"
version = "0.42.1"
@@ -4035,12 +2683,6 @@ version = "0.48.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953"
-[[package]]
-name = "windows_x86_64_gnullvm"
-version = "0.52.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e"
-
[[package]]
name = "windows_x86_64_msvc"
version = "0.36.1"
@@ -4059,12 +2701,6 @@ version = "0.48.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a"
-[[package]]
-name = "windows_x86_64_msvc"
-version = "0.52.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04"
-
[[package]]
name = "winreg"
version = "0.7.0"
@@ -4083,35 +2719,3 @@ dependencies = [
"cfg-if",
"windows-sys 0.48.0",
]
-
-[[package]]
-name = "yasna"
-version = "0.5.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e17bb3549cc1321ae1296b9cdc2698e2b6cb1992adfa19a8c72e5b7a738f44cd"
-
-[[package]]
-name = "zerocopy"
-version = "0.7.28"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7d6f15f7ade05d2a4935e34a457b936c23dc70a05cc1d97133dc99e7a3fe0f0e"
-dependencies = [
- "zerocopy-derive",
-]
-
-[[package]]
-name = "zerocopy-derive"
-version = "0.7.28"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "dbbad221e3f78500350ecbd7dfa4e63ef945c05f4c61cb7f4d3f84cd0bba649b"
-dependencies = [
- "proc-macro2",
- "quote",
- "syn 2.0.48",
-]
-
-[[package]]
-name = "zeroize"
-version = "1.7.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d"
diff --git a/Dockerfile b/Dockerfile
index 5f8046a4..384b1544 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -14,7 +14,7 @@ COPY . .
ENV SQLX_OFFLINE=true
-RUN cargo build --features=reacher_backend/worker,reacher_backend/postgres --bin reacher_backend --release --target=x86_64-unknown-linux-musl
+RUN cargo build --bin reacher_backend --release --target=x86_64-unknown-linux-musl
# ------------------------------------------------------------------------------
# Final Stage
@@ -43,8 +43,6 @@ ENV RUST_LOG=reacher=info
ENV RCH_HTTP_HOST=0.0.0.0
ENV PORT=8080
ENV RCH_WEBDRIVER_ADDR=http://localhost:9515
-# Bulk verification is disabled by default. Set to 1 to enable it.
-ENV RCH_ENABLE_BULK=0
EXPOSE 8080
diff --git a/backend/Cargo.toml b/backend/Cargo.toml
index 12dd4bc6..2861ceb6 100644
--- a/backend/Cargo.toml
+++ b/backend/Cargo.toml
@@ -9,37 +9,11 @@ publish = false
async-smtp = "0.6"
check-if-email-exists = { path = "../core", features = ["headless"] }
dotenv = "0.15.0"
-futures = { version = "0.3.30", optional = true }
-futures-lite = { version = "2.2.0", optional = true }
-lapin = { version = "2.3.1", optional = true }
openssl = { version = "0.10.62", features = ["vendored"] }
-reqwest = { version = "0.11.23", features = ["json"], optional = true }
sentry = "0.23"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
-sqlx = { version = "0.7", features = [
- "runtime-tokio-native-tls",
- "postgres",
- "uuid",
- "chrono",
- "json",
- "migrate",
-], optional = true }
tokio = { version = "1.35", features = ["macros"] }
-tokio-executor-trait = { version = "2.1.1", optional = true }
-tokio-reactor-trait = { version = "1.1.0", optional = true }
tracing = "0.1.40"
tracing-subscriber = "0.3.18"
warp = "0.3"
-
-[features]
-worker = [
- "futures",
- "futures-lite",
- "lapin",
- "reqwest",
- "tokio-executor-trait",
- "tokio-reactor-trait",
-]
-
-postgres = ["sqlx"]
diff --git a/backend/README.md b/backend/README.md
index 4084f3bb..8ce5cc92 100644
--- a/backend/README.md
+++ b/backend/README.md
@@ -14,8 +14,6 @@ This crate holds the backend for [Reacher](https://reacher.email). The backend i
- [`check-if-email-exists`](https://github.com/reacherhq/check-if-email-exists), which performs the core email verification logic,
- [`warp`](https://github.com/seanmonstar/warp) web framework.
-> 💡 Update: Bulk email verification is currently being worked on, and is in **beta** phase. You can try to use the bulk verification endpoints by setting the environment variable `RCH_ENABLE_BULK=1`. The documentation is currently being [worked on](https://github.com/reacherhq/backend/issues/321).
-
## Get Started
The [Docker image](./Dockerfile) is hosted on Docker Hub: https://hub.docker.com/r/reacherhq/backend.
@@ -47,19 +45,17 @@ Then send a `POST http://localhost:8080/v0/check_email` request with the followi
These are the environment variables used to configure the HTTP server. To pass them to the Docker container, use the `-e {ENV_VAR}={VALUE}` flag.
-| Env Var | Required? | Description | Default |
-| ------------------------------ | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------- |
-| `RUST_LOG` | No | One of `trace,debug,warn,error,info`. 💡 PRO TIP: `RUST_LOG=debug` is very handful for debugging purposes. | not defined |
-| `RCH_HTTP_HOST` | No | The host name to bind the HTTP server to. | `127.0.0.1` |
-| `PORT` | No | The port to bind the HTTP server to, often populated by the cloud provider. | `8080` |
-| `RCH_SENTRY_DSN` | No | If set, bug reports will be sent to this [Sentry](https://sentry.io) DSN. | not defined |
-| `RCH_HEADER_SECRET` | No | If set, then all HTTP requests must have the `x-reacher-secret` header set to this value. This is used to protect the backend against public unwanted HTTP requests. | undefined |
-| `RCH_FROM_EMAIL` | No | Email to use in the `<MAIL FROM:>` SMTP step. Can be overwritten by each API request's `from_email` field. | [email protected] |
-| `RCH_HELLO_NAME` | No | Name to use in the `<EHLO>` SMTP step. Can be overwritten by each API request's `hello_name` field. | gmail.com |
-| `RCH_SMTP_TIMEOUT` | No | Timeout for each SMTP connection. | 45s |
-| `RCH_WEBDRIVER_ADDR` | No | Set to a running WebDriver process endpoint (e.g. `http://localhost:9515`) to use a headless navigator to password recovery pages to check Yahoo and Hotmail/Outlook addresses. We recommend `chromedriver` as it allows parallel requests. | not defined |
-| `DATABASE_URL` | No | If set, Reacher will write bulk email verification results to this DB. | not defined |
-| `RCH_DATABASE_MAX_CONNECTIONS` | No | [Bulk] Connections created for the database pool | 5 |
+| Env Var | Required? | Description | Default |
+| -------------------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------- |
+| `RUST_LOG` | No | One of `trace,debug,warn,error,info`. 💡 PRO TIP: `RUST_LOG=debug` is very handful for debugging purposes. | not defined |
+| `RCH_HTTP_HOST` | No | The host name to bind the HTTP server to. | `127.0.0.1` |
+| `PORT` | No | The port to bind the HTTP server to, often populated by the cloud provider. | `8080` |
+| `RCH_SENTRY_DSN` | No | If set, bug reports will be sent to this [Sentry](https://sentry.io) DSN. | not defined |
+| `RCH_HEADER_SECRET` | No | If set, then all HTTP requests must have the `x-reacher-secret` header set to this value. This is used to protect the backend against public unwanted HTTP requests. | undefined |
+| `RCH_FROM_EMAIL` | No | Email to use in the `<MAIL FROM:>` SMTP step. Can be overwritten by each API request's `from_email` field. | [email protected] |
+| `RCH_HELLO_NAME` | No | Name to use in the `<EHLO>` SMTP step. Can be overwritten by each API request's `hello_name` field. | gmail.com |
+| `RCH_SMTP_TIMEOUT` | No | Timeout for each SMTP connection. | 45s |
+| `RCH_WEBDRIVER_ADDR` | No | Set to a running WebDriver process endpoint (e.g. `http://localhost:9515`) to use a headless navigator to password recovery pages to check Yahoo and Hotmail/Outlook addresses. We recommend `chromedriver` as it allows parallel requests. | not defined |
## REST API Documentation
@@ -110,14 +106,3 @@ $ RUST_LOG=info ./target/release/reacher_backend
```
The server will then be listening on `http://127.0.0.1:8080`.
-
-## Prune DB
-
-- Start a PostgreSQL Server
-- Start Reacher with Bulk Endpoints enabled.
- - e.g `.env` :
- RCH_ENABLE_BULK=1
- DATABASE_URL="postgresql://user:temporary@localhost"
-- Inside `.env` set `DAYS_OLD` e.g 1,2 etc
-- Send a request to the Bulk End point and wait for the job id to be allotted.
-- Build and Run `script` with `cargo run --bin prune_db`
diff --git a/backend/SETUP.md b/backend/SETUP.md
deleted file mode 100644
index 417acd2d..00000000
--- a/backend/SETUP.md
+++ /dev/null
@@ -1,8 +0,0 @@
-## Dev environment installation
-
-1. Install [docker](https://docs.docker.com/get-docker/)
-2. Run the following command to get a postgresql database running - `docker run --name <container-name> -p 5432:5432 -e POSTGRES_PASSWORD=<password> -d postgres:14`. Note that default user and database is postgres.
-3. Download migrations from [sqlxmq](https://github.com/Diggsey/sqlxmq#database-schema) to setup database for message queue.
-4. Install [psql](https://blog.timescale.com/blog/how-to-install-psql-on-mac-ubuntu-debian-windows/) to apply migrations to db.
-5. Use `cargo install rargs` and run the following to apply migrations - `ls migrations/**/*up.sql | rargs psql postgres://postgres:<password>@localhost/postgres -f {0}`
-6. Add a `.env` file with a single key for the connection string `DATABASE_URL=postgres://postgres:<password>@localhost/postgres`. This will be read by the application at runtime from the environment and be used to connect to the environment. This will also be used by sqlx to verify sql queries at compile time. **NOTE:** You only need to run this migration once for a fresh database.
diff --git a/backend/src/http/mod.rs b/backend/src/http/mod.rs
index b5e977a2..958369d1 100644
--- a/backend/src/http/mod.rs
+++ b/backend/src/http/mod.rs
@@ -15,30 +15,17 @@
// along with this program. If not, see <https://www.gnu.org/licenses/>.
mod v0;
-mod v1;
mod version;
use std::env;
use std::net::IpAddr;
use check_if_email_exists::LOG_TARGET;
-#[cfg(feature = "worker")]
-use lapin::Channel;
use tracing::info;
use warp::Filter;
use super::errors;
-#[cfg(feature = "worker")]
-fn create_routes_with_bulk(
- channel: Channel,
-) -> impl Filter<Extract = (impl warp::Reply,), Error = warp::Rejection> + Clone {
- version::get::get_version()
- .or(v0::check_email::post::post_check_email())
- .or(v1::bulk::post::create_bulk_job(channel))
- .recover(errors::handle_rejection)
-}
-
/// Creates the routes for the HTTP server.
/// Making it public so that it can be used in tests/check_email.rs.
pub fn create_routes_without_bulk(
@@ -52,9 +39,7 @@ pub fn create_routes_without_bulk(
///
/// This function starts the Warp server and listens for incoming requests.
/// It returns a `Result` indicating whether the server started successfully or encountered an error.
-pub async fn run_warp_server(
- #[cfg(feature = "worker")] channel: Channel,
-) -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
+pub async fn run_warp_server() -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
let host = env::var("RCH_HTTP_HOST")
.unwrap_or_else(|_| "127.0.0.1".into())
.parse::<IpAddr>()
@@ -66,9 +51,6 @@ pub async fn run_warp_server(
})
.unwrap_or(8080);
- #[cfg(feature = "worker")]
- let routes = create_routes_with_bulk(channel);
- #[cfg(not(feature = "worker"))]
let routes = create_routes_without_bulk();
info!(target: LOG_TARGET, host=?host,port=?port, "Server is listening");
diff --git a/backend/src/http/v1/bulk/error.rs b/backend/src/http/v1/bulk/error.rs
deleted file mode 100644
index 7269a43f..00000000
--- a/backend/src/http/v1/bulk/error.rs
+++ /dev/null
@@ -1,40 +0,0 @@
-// Reacher - Email Verification
-// Copyright (C) 2018-2023 Reacher
-
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero General Public License as published
-// by the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU Affero General Public License for more details.
-
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see <https://www.gnu.org/licenses/>.
-
-use warp::reject;
-
-/// Catch all error struct for the bulk endpoints
-#[derive(Debug)]
-pub enum BulkError {
- EmptyInput,
- Serde(serde_json::Error),
- Lapin(lapin::Error),
-}
-
-// Defaults to Internal server error
-impl reject::Reject for BulkError {}
-
-impl From<serde_json::Error> for BulkError {
- fn from(e: serde_json::Error) -> Self {
- BulkError::Serde(e)
- }
-}
-
-impl From<lapin::Error> for BulkError {
- fn from(e: lapin::Error) -> Self {
- BulkError::Lapin(e)
- }
-}
diff --git a/backend/src/http/v1/bulk/mod.rs b/backend/src/http/v1/bulk/mod.rs
deleted file mode 100644
index 245145f3..00000000
--- a/backend/src/http/v1/bulk/mod.rs
+++ /dev/null
@@ -1,2 +0,0 @@
-pub mod error;
-pub mod post;
diff --git a/backend/src/http/v1/bulk/post.rs b/backend/src/http/v1/bulk/post.rs
deleted file mode 100644
index 7eb6f366..00000000
--- a/backend/src/http/v1/bulk/post.rs
+++ /dev/null
@@ -1,139 +0,0 @@
-// Reacher - Email Verification
-// Copyright (C) 2018-2023 Reacher
-
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero General Public License as published
-// by the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU Affero General Public License for more details.
-
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see <https://www.gnu.org/licenses/>.
-
-//! This file implements the `POST /v1/bulk` endpoint.
-
-use check_if_email_exists::CheckEmailInput;
-use check_if_email_exists::CheckEmailInputProxy;
-use check_if_email_exists::LOG_TARGET;
-use futures::stream::StreamExt;
-use futures::stream::TryStreamExt;
-use lapin::Channel;
-use lapin::{options::*, BasicProperties};
-use serde::{Deserialize, Serialize};
-use tracing::debug;
-use warp::Filter;
-
-use super::error::BulkError;
-use crate::check::check_header;
-use crate::worker::check_email::CheckEmailPayload;
-use crate::worker::check_email::CheckEmailWebhook;
-
-/// Endpoint request body.
-#[derive(Debug, Deserialize)]
-struct CreateBulkRequest {
- input: Vec<String>,
- proxy: Option<CheckEmailInputProxy>,
- hello_name: Option<String>,
- from_email: Option<String>,
- webhook: Option<CheckEmailWebhook>,
-}
-
-/// Endpoint response body.
-#[derive(Clone, Debug, Deserialize, Serialize)]
-struct CreateBulkResponse {
- message: String,
-}
-
-async fn create_bulk_request(
- channel: Channel,
- body: CreateBulkRequest,
-) -> Result<impl warp::Reply, warp::Rejection> {
- if body.input.is_empty() {
- return Err(BulkError::EmptyInput.into());
- }
-
- let payloads = body.input.iter().map(|email| {
- let mut input = CheckEmailInput::new(email.to_string());
- if let Some(from_email) = &body.from_email {
- input.set_from_email(from_email.clone());
- }
- if let Some(hello_name) = &body.hello_name {
- input.set_hello_name(hello_name.clone());
- }
- if let Some(proxy) = &body.proxy {
- input.set_proxy(proxy.clone());
- }
-
- CheckEmailPayload {
- input,
- webhook: body.webhook.clone(),
- }
- });
-
- let n = payloads.len();
- let stream = futures::stream::iter(payloads);
-
- stream
- .map::<Result<_, BulkError>, _>(Ok)
- .try_for_each_concurrent(10, |payload| {
- let channel = channel.clone();
- let properties: lapin::protocol::basic::AMQPProperties = BasicProperties::default()
- .with_content_type("application/json".into())
- .with_priority(1);
-
- async move {
- let payload_u8 = serde_json::to_vec(&payload)?;
- let queue_name = "check_email.Smtp"; // TODO We might want to make this configurable.
- channel
- .basic_publish(
- "",
- queue_name,
- BasicPublishOptions::default(),
- &payload_u8,
- properties,
- )
- .await?
- .await?;
-
- debug!(target: LOG_TARGET, email=?payload.input.to_email, queue=?queue_name, "Enqueued");
-
- Ok(())
- }
- })
- .await?;
-
- Ok(warp::reply::json(&CreateBulkResponse {
- message: format!("Successfully added {n} emails to the queue"),
- }))
-}
-
-/// Create the `POST /bulk` endpoint.
-/// The endpoint accepts list of email address and creates
-/// a new job to check them.
-pub fn create_bulk_job(
- o: Channel,
-) -> impl Filter<Extract = (impl warp::Reply,), Error = warp::Rejection> + Clone {
- warp::path!("v1" / "bulk")
- .and(warp::post())
- .and(check_header())
- .and(with_channel(o))
- // When accepting a body, we want a JSON body (and to reject huge
- // payloads)...
- // TODO: Configure max size limit for a bulk job
- .and(warp::body::content_length_limit(1024 * 16))
- .and(warp::body::json())
- .and_then(create_bulk_request)
- // View access logs by setting `RUST_LOG=reacher_backend`.
- .with(warp::log(LOG_TARGET))
-}
-
-/// Warp filter that extracts lapin Channel.
-fn with_channel(
- channel: Channel,
-) -> impl Filter<Extract = (Channel,), Error = std::convert::Infallible> + Clone {
- warp::any().map(move || channel.clone())
-}
diff --git a/backend/src/http/v1/mod.rs b/backend/src/http/v1/mod.rs
deleted file mode 100644
index e975d14a..00000000
--- a/backend/src/http/v1/mod.rs
+++ /dev/null
@@ -1,2 +0,0 @@
-#[cfg(feature = "worker")]
-pub mod bulk;
diff --git a/backend/src/lib.rs b/backend/src/lib.rs
index e8ef4a93..6404c911 100644
--- a/backend/src/lib.rs
+++ b/backend/src/lib.rs
@@ -18,5 +18,3 @@ pub mod check;
mod errors;
pub mod http;
pub mod sentry_util;
-#[cfg(feature = "worker")]
-pub mod worker;
diff --git a/backend/src/main.rs b/backend/src/main.rs
index 634f7423..ffd7b171 100644
--- a/backend/src/main.rs
+++ b/backend/src/main.rs
@@ -17,26 +17,15 @@
//! Main entry point of the `reacher_backend` binary. It has two `main`
//! functions, depending on whether the `bulk` feature is enabled or not.
-#[cfg(feature = "worker")]
-use std::env;
-
use check_if_email_exists::LOG_TARGET;
-#[cfg(feature = "worker")]
-use futures::try_join;
use tracing::info;
-#[cfg(feature = "worker")]
-use reacher_backend::worker::create_channel;
-#[cfg(feature = "worker")]
-use reacher_backend::worker::run_worker;
use reacher_backend::{
http::run_warp_server,
sentry_util::{setup_sentry, CARGO_PKG_VERSION},
};
/// Run a HTTP server using warp with bulk endpoints.
-/// If the worker feature is enabled, this function will also start a worker
-/// that listens to an AMQP message queue.
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
// Initialize logging.
@@ -46,19 +35,8 @@ async fn main() -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
// Setup sentry bug tracking.
let _guard: sentry::ClientInitGuard = setup_sentry();
- #[cfg(feature = "worker")]
- {
- let backend_name = env::var("RCH_BACKEND_NAME").expect("RCH_BACKEND_NAME is not set");
- let channel = create_channel(&backend_name).await?;
- let http_server = run_warp_server(channel.clone());
- try_join!(http_server, run_worker(channel, &backend_name))?;
- }
-
- #[cfg(not(feature = "worker"))]
- {
- let http_server = run_warp_server();
- http_server.await?
- }
+ let http_server = run_warp_server();
+ http_server.await?;
Ok(())
}
diff --git a/backend/src/worker/check_email.rs b/backend/src/worker/check_email.rs
deleted file mode 100644
index 40151218..00000000
--- a/backend/src/worker/check_email.rs
+++ /dev/null
@@ -1,129 +0,0 @@
-// Reacher - Email Verification
-// Copyright (C) 2018-2023 Reacher
-
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero General Public License as published
-// by the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU Affero General Public License for more details.
-
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see <https://www.gnu.org/licenses/>.
-
-use check_if_email_exists::{CheckEmailInput, CheckEmailOutput};
-use check_if_email_exists::{Reachable, LOG_TARGET};
-use lapin::message::Delivery;
-use lapin::{options::*, BasicProperties, Channel};
-use serde::{Deserialize, Serialize};
-#[cfg(feature = "postgres")]
-use sqlx::{Pool, Postgres};
-use tracing::{debug, info};
-
-#[cfg(feature = "postgres")]
-use super::db::save_to_db;
-
-use crate::check::check_email;
-
-#[derive(Debug, Deserialize, Serialize)]
-pub struct CheckEmailPayload {
- pub input: CheckEmailInput,
- pub webhook: Option<CheckEmailWebhook>,
-}
-
-#[derive(Clone, Debug, Deserialize, Serialize)]
-pub struct CheckEmailWebhook {
- pub url: String,
- pub extra: serde_json::Value,
-}
-
-#[derive(Debug, Serialize)]
-struct WebhookOutput {
- output: CheckEmailOutput,
- extra: serde_json::Value,
-}
-
-/// Processes the check email task asynchronously.
-pub async fn process_check_email(
- channel: &Channel,
- delivery: Delivery,
- #[cfg(feature = "postgres")] conn_pool: Option<Pool<Postgres>>,
-) -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
- let payload = serde_json::from_slice::<CheckEmailPayload>(&delivery.data)?;
- info!(target: LOG_TARGET, email=?payload.input.to_email, "New job");
- debug!(target: LOG_TARGET, payload=?payload);
-
- let output = check_email(payload.input).await;
- info!(target: LOG_TARGET, email=output.input, is_reachable=?output.is_reachable, "Done check");
- let reply_payload = serde_json::to_string(&output)?;
- let reply_payload = reply_payload.as_bytes();
-
- // Send reply by following this guide:
- // https://www.rabbitmq.com/tutorials/tutorial-six-javascript.html
- if let (Some(reply_to), Some(correlation_id)) = (
- delivery.properties.reply_to(),
- delivery.properties.correlation_id(),
- ) {
- let properties = BasicProperties::default()
- .with_correlation_id(correlation_id.to_owned())
- .with_content_type("application/json".into());
-
- channel
- .basic_publish(
- "",
- reply_to.as_str(),
- BasicPublishOptions::default(),
- reply_payload,
- properties,
- )
- .await?
- .await?;
-
- debug!(target: LOG_TARGET, reply_to=?reply_to, correlation_id=?correlation_id, "Sent reply")
- }
-
- let (email, is_reachable) = (output.input.to_owned(), output.is_reachable.clone());
-
- // Check if we have a DB to save the results to
- #[cfg(feature = "postgres")]
- if let Some(conn_pool) = conn_pool {
- save_to_db(conn_pool, &output).await?;
- }
-
- // Check if we have a webhook to send the output to.
- if let Some(webhook) = payload.webhook {
- let webhook_output = WebhookOutput {
- output,
- extra: webhook.extra,
- };
-
- let client = reqwest::Client::new();
- let res = client
- .post(webhook.url)
- .json(&webhook_output)
- .header("x-reacher-secret", std::env::var("RCH_HEADER_SECRET")?)
- .send()
- .await?
- .text()
- .await?;
- debug!(target: LOG_TARGET, email=?webhook_output.output.input,res=?res, "Received webhook response");
- info!(target: LOG_TARGET, email=?webhook_output.output.input, is_reachable=?webhook_output.output.is_reachable, "Finished check");
- }
-
- // If is_reachable is unknown, then we requeue the message, but only once.
- // We might want to add a requeue counter in the future, see:
- // https://stackoverflow.com/questions/25226080/rabbitmq-how-to-requeue-message-with-counter
- if is_reachable == Reachable::Unknown && !delivery.redelivered {
- delivery
- .reject(BasicRejectOptions { requeue: true })
- .await?;
- info!(target: LOG_TARGET, email=?email, "Requeued message");
- } else {
- delivery.ack(BasicAckOptions::default()).await?;
- }
-
- Ok(())
-}
diff --git a/backend/src/worker/db.rs b/backend/src/worker/db.rs
deleted file mode 100644
index ceae6164..00000000
--- a/backend/src/worker/db.rs
+++ /dev/null
@@ -1,75 +0,0 @@
-// Reacher - Email Verification
-// Copyright (C) 2018-2023 Reacher
-
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero General Public License as published
-// by the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU Affero General Public License for more details.
-
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see <https://www.gnu.org/licenses/>.
-
-use std::env;
-
-use check_if_email_exists::{CheckEmailOutput, LOG_TARGET};
-use sqlx::{postgres::PgPoolOptions, Pool, Postgres};
-use tracing::{debug, info};
-
-pub async fn save_to_db(
- conn_pool: Pool<Postgres>,
- output: &CheckEmailOutput,
-) -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
- let output_json = serde_json::to_value(output)?;
- let is_reachable = format!("{:?}", output.is_reachable);
- sqlx::query!(
- r#"
- INSERT INTO email_results (email, is_reachable, full_result)
- VALUES ($1, $2, $3)
- RETURNING id
- "#,
- output.input,
- is_reachable,
- output_json
- )
- .fetch_one(&conn_pool)
- .await?;
-
- debug!(target: LOG_TARGET, email=?output.input, is_reachable=?is_reachable, "Wrote to DB");
-
- Ok(())
-}
-
-/// Create a DB pool.
-pub async fn create_db() -> Result<Option<Pool<Postgres>>, sqlx::Error> {
- let pg_conn = env::var("DATABASE_URL").ok();
- let pg_max_conn = env::var("RCH_DATABASE_MAX_CONNECTIONS").map_or(5, |var| {
- var.parse::<u32>()
- .expect("Environment variable RCH_DATABASE_MAX_CONNECTIONS should parse to u32")
- });
-
- // create connection pool with database
- // connection pool internally the shared db connection
- // with arc so it can safely be cloned and shared across threads
- let pool = match pg_conn {
- Some(pg_conn_str) => {
- let pool = PgPoolOptions::new()
- .max_connections(pg_max_conn)
- .connect(pg_conn_str.as_str())
- .await?;
-
- sqlx::migrate!("./migrations").run(&pool).await?;
-
- info!(target: LOG_TARGET, table="email_results", "Connected to DB, Reacher will write results to DB");
-
- Some(pool)
- }
- None => None,
- };
-
- Ok(pool)
-}
diff --git a/backend/src/worker/mod.rs b/backend/src/worker/mod.rs
deleted file mode 100644
index 56bab169..00000000
--- a/backend/src/worker/mod.rs
+++ /dev/null
@@ -1,139 +0,0 @@
-// Reacher - Email Verification
-// Copyright (C) 2018-2023 Reacher
-
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero General Public License as published
-// by the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU Affero General Public License for more details.
-
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see <https://www.gnu.org/licenses/>.
-
-use std::env;
-
-use check_if_email_exists::LOG_TARGET;
-use futures_lite::StreamExt;
-use lapin::{options::*, types::FieldTable, Channel, Connection, ConnectionProperties};
-use tracing::{error, info};
-
-pub mod check_email;
-#[cfg(feature = "postgres")]
-mod db;
-
-use check_email::process_check_email;
-#[cfg(feature = "postgres")]
-use db::create_db;
-
-pub async fn create_channel(
- backend_name: &str,
-) -> Result<Channel, Box<dyn std::error::Error + Send + Sync>> {
- // Make sure the worker is well configured.
- let addr = env::var("RCH_AMQP_ADDR").unwrap_or_else(|_| "amqp://127.0.0.1:5672".into());
-
- let options = ConnectionProperties::default()
- // Use tokio executor and reactor.
- // At the moment the reactor is only available for unix (ref: https://github.com/amqp-rs/reactor-trait/issues/1)
- .with_executor(tokio_executor_trait::Tokio::current())
- .with_reactor(tokio_reactor_trait::Tokio)
- .with_connection_name(backend_name.into());
-
- let conn = Connection::connect(&addr, options).await?;
-
- // Receive channel
- let channel = conn.create_channel().await?;
- let concurrency = env::var("RCH_WORKER_CONCURRENCY")
- .ok()
- .and_then(|s| s.parse::<u16>().ok())
- .unwrap_or(10);
- channel
- .basic_qos(concurrency, BasicQosOptions { global: false })
- .await?;
- info!(target: LOG_TARGET, backend=?backend_name,state=?conn.status().state(), concurrency=?concurrency, "Connected to AMQP broker");
-
- Ok(channel)
-}
-
-pub async fn run_worker(
- channel: Channel,
- backend_name: &str,
-) -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
- let verif_method: VerifMethod = env::var("RCH_VERIF_METHOD")
- .map(|s| s.as_str().into())
- .unwrap_or(VerifMethod::Smtp);
-
- // Create queue "check_email.{Smtp,Headless}" with priority.
- let queue_name = format!("check_email.{:?}", verif_method);
- let mut queue_args = FieldTable::default();
- queue_args.insert("x-max-priority".into(), 5.into()); // https://www.rabbitmq.com/priority.html
-
- channel
- .queue_declare(
- &queue_name,
- QueueDeclareOptions {
- durable: true,
- ..Default::default()
- },
- queue_args,
- )
- .await?;
-
- info!(target: LOG_TARGET, queue=?queue_name, "Worker will start consuming messages");
- let mut consumer = channel
- .basic_consume(
- &queue_name,
- backend_name,
- BasicConsumeOptions::default(),
- FieldTable::default(),
- )
- .await?;
-
- #[cfg(feature = "postgres")]
- let conn_pool = create_db().await?;
-
- while let Some(delivery) = consumer.next().await {
- if let Ok(delivery) = delivery {
- let channel = channel.clone();
- #[cfg(feature = "postgres")]
- let conn_pool = conn_pool.clone();
- tokio::spawn(async move {
- #[cfg(feature = "postgres")]
- let res = process_check_email(&channel, delivery, conn_pool).await;
- #[cfg(not(feature = "postgres"))]
- let res = process_check_email(&channel, delivery).await;
- if let Err(err) = res {
- error!(target: LOG_TARGET, error=?err, "Error processing message");
- }
- });
- }
- }
-
- Ok(())
-}
-
-// Verification method used by the worker.
-#[derive(Debug, Clone, Copy)]
-enum VerifMethod {
- // This worker will use a headless browser to verify emails.
- // Oftentimes, this also means that the worker doesn't have port 25 open.
- Headless,
- // This worker will use a SMTP server to verify emails.
- Smtp,
-}
-
-impl From<&str> for VerifMethod {
- fn from(s: &str) -> Self {
- match s {
- "Headless" => Self::Headless,
- "Smtp" => Self::Smtp,
- _ => panic!(
- "Unknown verification method {}, must be one of Headless, Smtp",
- s
- ),
- }
- }
-}
diff --git a/ci/build.ps1 b/ci/build.ps1
index cce1d777..304e4063 100644
--- a/ci/build.ps1
+++ b/ci/build.ps1
@@ -2,12 +2,9 @@ $cross = $args[0]
$target_triple = $args[1]
$release_build = $args[2]
-# reacher_worker doesn't compile on windows because of this bug:
-# https://github.com/amqp-rs/reactor-trait/issues/1
-# So we only build the check_if_email_exists binary for Windows.
if ( $release_build -ne "RELEASE" ) {
- Invoke-Expression "$cross build --bin check_if_email_exists --target $target_triple"
- Invoke-Expression "$cross build --bin check_if_email_exists --target $target_triple --all-features"
+ Invoke-Expression "$cross build --target $target_triple"
+ Invoke-Expression "$cross build --target $target_triple --all-features"
} else {
- Invoke-Expression "$cross build --bin check_if_email_exists --target $target_triple --all-features --release"
+ Invoke-Expression "$cross build --target $target_triple --all-features --release"
}
\ No newline at end of file
diff --git a/ci/test.bash b/ci/test.bash
index 779dac55..f85e2483 100755
--- a/ci/test.bash
+++ b/ci/test.bash
@@ -12,8 +12,5 @@ TARGET_TRIPLE=$2
required_arg $CROSS 'CROSS'
required_arg $TARGET_TRIPLE '<Target Triple>'
-# reacher_worker doesn't compile on windows because of this bug:
-# https://github.com/amqp-rs/reactor-trait/issues/1
-# So we only build the check_if_email_exists binary for Windows.
-$CROSS test --bin check_if_email_exists --target $TARGET_TRIPLE
-$CROSS test --bin check_if_email_exists --target $TARGET_TRIPLE --all-features
+$CROSS test --target $TARGET_TRIPLE
+$CROSS test --target $TARGET_TRIPLE --all-features