1
0
mirror of https://github.com/actix/examples synced 2025-01-22 14:05:55 +01:00

chore: update the apalis example to the latest version

This commit is contained in:
geofmureithi 2024-12-06 03:29:32 +03:00
parent 3bf5a5a372
commit d54a38ce73
No known key found for this signature in database
GPG Key ID: 0DB5FB3B267761E6
3 changed files with 184 additions and 134 deletions

302
Cargo.lock generated
View File

@ -239,7 +239,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e01ed3140b2f8d422c68afa1ed2e85d996ea619c988ac834d255db32138655cb" checksum = "e01ed3140b2f8d422c68afa1ed2e85d996ea619c988ac834d255db32138655cb"
dependencies = [ dependencies = [
"quote", "quote",
"syn 2.0.79", "syn 2.0.90",
] ]
[[package]] [[package]]
@ -277,7 +277,7 @@ dependencies = [
"parse-size", "parse-size",
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.79", "syn 2.0.90",
] ]
[[package]] [[package]]
@ -506,7 +506,7 @@ dependencies = [
"actix-router", "actix-router",
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.79", "syn 2.0.90",
] ]
[[package]] [[package]]
@ -556,7 +556,7 @@ checksum = "008f98f5a68eeacf5e6d44ed74ce03c1b906baa53eabfb41faf0f5f40bd685f8"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.79", "syn 2.0.90",
] ]
[[package]] [[package]]
@ -581,7 +581,7 @@ checksum = "b6ac1e58cded18cb28ddc17143c4dea5345b3ad575e14f32f66e4054a56eb271"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.79", "syn 2.0.90",
] ]
[[package]] [[package]]
@ -792,43 +792,41 @@ checksum = "86fdf8605db99b54d3cd748a44c6d04df638eb5dafb219b135d0149bd0db01f6"
[[package]] [[package]]
name = "apalis" name = "apalis"
version = "0.6.0-rc.7" version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7fe9f6044555ce7984b4dff510f869c25ee8258d13277eadcfee11efa0a827a0" checksum = "f6c36683a811005d394c4b1ccbfa2ecf3820710338fea40e3582bb73d8c8c744"
dependencies = [ dependencies = [
"apalis-core", "apalis-core",
"futures", "futures",
"pin-project-lite", "pin-project-lite",
"serde", "serde",
"thiserror", "thiserror 2.0.4",
"tokio", "tower 0.5.1",
"tower",
"tracing", "tracing",
"tracing-futures", "tracing-futures",
] ]
[[package]] [[package]]
name = "apalis-core" name = "apalis-core"
version = "0.6.0-rc.7" version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1f7959df1edc75df26a1ee13a46d1b59fd63ba6642a6c29039583f5aedfd13aa" checksum = "4aecdd2202aba3d0efdd9cf6368696fe928847544542ba49e33b2660d4bf8aeb"
dependencies = [ dependencies = [
"async-oneshot",
"futures", "futures",
"futures-timer", "futures-timer",
"pin-project-lite", "pin-project-lite",
"serde", "serde",
"serde_json", "serde_json",
"thiserror", "thiserror 2.0.4",
"tower", "tower 0.5.1",
"ulid", "ulid",
] ]
[[package]] [[package]]
name = "apalis-redis" name = "apalis-redis"
version = "0.6.0-rc.7" version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "405b6457c973eb82ed4a20048131b767ebca684cdc4897d42f622ed115641f21" checksum = "03205caed91151b659fe80f29f5c5f315d36ac2d9791accf833f9ce08fec7957"
dependencies = [ dependencies = [
"apalis-core", "apalis-core",
"async-stream", "async-stream",
@ -836,11 +834,12 @@ dependencies = [
"chrono", "chrono",
"futures", "futures",
"log", "log",
"redis 0.25.4", "redis 0.27.6",
"serde", "serde",
"serde_json", "serde_json",
"thiserror 2.0.4",
"tokio", "tokio",
"tower", "tower 0.5.1",
] ]
[[package]] [[package]]
@ -893,7 +892,7 @@ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"serde", "serde",
"syn 2.0.79", "syn 2.0.90",
] ]
[[package]] [[package]]
@ -961,7 +960,7 @@ dependencies = [
"serde_urlencoded", "serde_urlencoded",
"static_assertions", "static_assertions",
"tempfile", "tempfile",
"thiserror", "thiserror 1.0.64",
] ]
[[package]] [[package]]
@ -980,7 +979,7 @@ dependencies = [
"futures-channel", "futures-channel",
"futures-util", "futures-util",
"serde_json", "serde_json",
"thiserror", "thiserror 1.0.64",
] ]
[[package]] [[package]]
@ -1009,8 +1008,8 @@ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"strum", "strum",
"syn 2.0.79", "syn 2.0.90",
"thiserror", "thiserror 1.0.64",
] ]
[[package]] [[package]]
@ -1037,15 +1036,6 @@ dependencies = [
"serde_json", "serde_json",
] ]
[[package]]
name = "async-oneshot"
version = "0.5.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ae47de2a02d543205f3f5457a90b6ecbc9494db70557bd29590ec8f1ddff5463"
dependencies = [
"futures-micro",
]
[[package]] [[package]]
name = "async-stream" name = "async-stream"
version = "0.3.6" version = "0.3.6"
@ -1065,7 +1055,7 @@ checksum = "c7c24de15d275a1ecfd47a380fb4d5ec9bfe0933f309ed5e705b775596a3574d"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.79", "syn 2.0.90",
] ]
[[package]] [[package]]
@ -1076,7 +1066,7 @@ checksum = "721cae7de5c34fbb2acd27e21e6d2cf7b886dce0c27388d46c4e6c47ea4318dd"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.79", "syn 2.0.90",
] ]
[[package]] [[package]]
@ -1103,7 +1093,7 @@ dependencies = [
"derive_utils", "derive_utils",
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.79", "syn 2.0.90",
] ]
[[package]] [[package]]
@ -1585,7 +1575,7 @@ dependencies = [
"rustversion", "rustversion",
"serde", "serde",
"sync_wrapper 0.1.2", "sync_wrapper 0.1.2",
"tower", "tower 0.4.13",
"tower-layer", "tower-layer",
"tower-service", "tower-service",
] ]
@ -1626,6 +1616,15 @@ dependencies = [
"tokio-util", "tokio-util",
] ]
[[package]]
name = "backon"
version = "1.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ba5289ec98f68f28dd809fd601059e6aa908bb8f6108620930828283d4ee23d7"
dependencies = [
"fastrand",
]
[[package]] [[package]]
name = "backtrace" name = "backtrace"
version = "0.3.71" version = "0.3.71"
@ -1745,7 +1744,7 @@ dependencies = [
"regex", "regex",
"rustc-hash 1.1.0", "rustc-hash 1.1.0",
"shlex", "shlex",
"syn 2.0.79", "syn 2.0.90",
"which", "which",
] ]
@ -1764,7 +1763,7 @@ dependencies = [
"regex", "regex",
"rustc-hash 1.1.0", "rustc-hash 1.1.0",
"shlex", "shlex",
"syn 2.0.79", "syn 2.0.90",
] ]
[[package]] [[package]]
@ -1834,7 +1833,7 @@ dependencies = [
"proc-macro-crate 3.2.0", "proc-macro-crate 3.2.0",
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.79", "syn 2.0.90",
"syn_derive", "syn_derive",
] ]
@ -1981,7 +1980,7 @@ dependencies = [
"rhai", "rhai",
"serde", "serde",
"serde_json", "serde_json",
"thiserror", "thiserror 1.0.64",
"tokio", "tokio",
] ]
@ -2121,7 +2120,7 @@ dependencies = [
"heck 0.5.0", "heck 0.5.0",
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.79", "syn 2.0.90",
] ]
[[package]] [[package]]
@ -2205,7 +2204,7 @@ dependencies = [
"confik-macros", "confik-macros",
"envious", "envious",
"serde", "serde",
"thiserror", "thiserror 1.0.64",
"toml 0.8.19", "toml 0.8.19",
] ]
@ -2218,7 +2217,7 @@ dependencies = [
"darling", "darling",
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.79", "syn 2.0.90",
] ]
[[package]] [[package]]
@ -2515,7 +2514,7 @@ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"strsim", "strsim",
"syn 2.0.79", "syn 2.0.90",
] ]
[[package]] [[package]]
@ -2526,7 +2525,7 @@ checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806"
dependencies = [ dependencies = [
"darling_core", "darling_core",
"quote", "quote",
"syn 2.0.79", "syn 2.0.90",
] ]
[[package]] [[package]]
@ -2663,7 +2662,7 @@ checksum = "8034092389675178f570469e6c3b0465d3d30b4505c294a6550db47f3c17ad18"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.79", "syn 2.0.90",
] ]
[[package]] [[package]]
@ -2697,7 +2696,7 @@ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"rustc_version", "rustc_version",
"syn 2.0.79", "syn 2.0.90",
] ]
[[package]] [[package]]
@ -2717,7 +2716,7 @@ checksum = "cb7330aeadfbe296029522e6c40f315320aba36fc43a5b3632f3795348f3bd22"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.79", "syn 2.0.90",
"unicode-xid", "unicode-xid",
] ]
@ -2729,7 +2728,7 @@ checksum = "65f152f4b8559c4da5d574bafc7af85454d706b4c5fe8b530d508cacbb6807ea"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.79", "syn 2.0.90",
] ]
[[package]] [[package]]
@ -2766,7 +2765,7 @@ dependencies = [
"dsl_auto_type", "dsl_auto_type",
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.79", "syn 2.0.90",
] ]
[[package]] [[package]]
@ -2775,7 +2774,7 @@ version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "209c735641a413bc68c4923a9d6ad4bcb3ca306b794edaa7eb0b3228a99ffb25" checksum = "209c735641a413bc68c4923a9d6ad4bcb3ca306b794edaa7eb0b3228a99ffb25"
dependencies = [ dependencies = [
"syn 2.0.79", "syn 2.0.90",
] ]
[[package]] [[package]]
@ -2798,7 +2797,7 @@ checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.79", "syn 2.0.90",
] ]
[[package]] [[package]]
@ -2827,7 +2826,7 @@ dependencies = [
"heck 0.5.0", "heck 0.5.0",
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.79", "syn 2.0.90",
] ]
[[package]] [[package]]
@ -2935,7 +2934,7 @@ dependencies = [
"heck 0.5.0", "heck 0.5.0",
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.79", "syn 2.0.90",
] ]
[[package]] [[package]]
@ -2968,7 +2967,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3e52788a407588138195a40c991f500621fea2cffa87e7345d86dbab77287dc7" checksum = "3e52788a407588138195a40c991f500621fea2cffa87e7345d86dbab77287dc7"
dependencies = [ dependencies = [
"serde", "serde",
"thiserror", "thiserror 1.0.64",
] ]
[[package]] [[package]]
@ -3142,7 +3141,7 @@ version = "0.11.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2a530c4694a6a8d528794ee9bbd8ba0122e779629ac908d15ad5a7ae7763a33d" checksum = "2a530c4694a6a8d528794ee9bbd8ba0122e779629ac908d15ad5a7ae7763a33d"
dependencies = [ dependencies = [
"thiserror", "thiserror 1.0.64",
] ]
[[package]] [[package]]
@ -3156,7 +3155,7 @@ dependencies = [
"once_cell", "once_cell",
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.79", "syn 2.0.90",
"unic-langid", "unic-langid",
] ]
@ -3180,7 +3179,7 @@ dependencies = [
"log", "log",
"once_cell", "once_cell",
"serde_json", "serde_json",
"thiserror", "thiserror 1.0.64",
"unic-langid", "unic-langid",
] ]
@ -3262,7 +3261,7 @@ checksum = "e99b8b3c28ae0e84b604c75f721c21dc77afb3706076af5e8216d15fd1deaae3"
dependencies = [ dependencies = [
"frunk_proc_macro_helpers", "frunk_proc_macro_helpers",
"quote", "quote",
"syn 2.0.79", "syn 2.0.90",
] ]
[[package]] [[package]]
@ -3274,7 +3273,7 @@ dependencies = [
"frunk_core", "frunk_core",
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.79", "syn 2.0.90",
] ]
[[package]] [[package]]
@ -3286,7 +3285,7 @@ dependencies = [
"frunk_core", "frunk_core",
"frunk_proc_macro_helpers", "frunk_proc_macro_helpers",
"quote", "quote",
"syn 2.0.79", "syn 2.0.90",
] ]
[[package]] [[package]]
@ -3387,16 +3386,7 @@ checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.79", "syn 2.0.90",
]
[[package]]
name = "futures-micro"
version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b460264b3593d68b16a7bc35f7bc226ddfebdf9a1c8db1ed95d5cc6b7168c826"
dependencies = [
"pin-project-lite",
] ]
[[package]] [[package]]
@ -3613,7 +3603,7 @@ dependencies = [
"pest_derive", "pest_derive",
"serde", "serde",
"serde_json", "serde_json",
"thiserror", "thiserror 1.0.64",
] ]
[[package]] [[package]]
@ -3627,7 +3617,7 @@ dependencies = [
"pest_derive", "pest_derive",
"serde", "serde",
"serde_json", "serde_json",
"thiserror", "thiserror 1.0.64",
"walkdir", "walkdir",
] ]
@ -3730,7 +3720,7 @@ dependencies = [
"ipnet", "ipnet",
"once_cell", "once_cell",
"rand", "rand",
"thiserror", "thiserror 1.0.64",
"tinyvec", "tinyvec",
"tokio", "tokio",
"tracing", "tracing",
@ -3753,7 +3743,7 @@ dependencies = [
"rand", "rand",
"resolv-conf", "resolv-conf",
"smallvec", "smallvec",
"thiserror", "thiserror 1.0.64",
"tokio", "tokio",
"tracing", "tracing",
] ]
@ -4164,7 +4154,7 @@ checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.79", "syn 2.0.90",
] ]
[[package]] [[package]]
@ -4513,7 +4503,7 @@ checksum = "760dbe46660494d469023d661e8d268f413b2cb68c999975dcc237407096a693"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.79", "syn 2.0.90",
"url", "url",
] ]
@ -4854,7 +4844,7 @@ dependencies = [
"metrics", "metrics",
"metrics-util", "metrics-util",
"quanta", "quanta",
"thiserror", "thiserror 1.0.64",
] ]
[[package]] [[package]]
@ -5062,7 +5052,7 @@ dependencies = [
"stringprep", "stringprep",
"strsim", "strsim",
"take_mut", "take_mut",
"thiserror", "thiserror 1.0.64",
"tokio", "tokio",
"tokio-rustls 0.24.1", "tokio-rustls 0.24.1",
"tokio-util", "tokio-util",
@ -5079,7 +5069,7 @@ checksum = "3a6dbc533e93429a71c44a14c04547ac783b56d3f22e6c4f12b1b994cf93844e"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.79", "syn 2.0.90",
] ]
[[package]] [[package]]
@ -5190,9 +5180,9 @@ dependencies = [
"proc-macro-error", "proc-macro-error",
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.79", "syn 2.0.90",
"termcolor", "termcolor",
"thiserror", "thiserror 1.0.64",
] ]
[[package]] [[package]]
@ -5228,7 +5218,7 @@ dependencies = [
"sha2", "sha2",
"smallvec", "smallvec",
"subprocess", "subprocess",
"thiserror", "thiserror 1.0.64",
"time", "time",
"uuid", "uuid",
] ]
@ -5443,7 +5433,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.79", "syn 2.0.90",
] ]
[[package]] [[package]]
@ -5475,7 +5465,7 @@ dependencies = [
"js-sys", "js-sys",
"once_cell", "once_cell",
"pin-project-lite", "pin-project-lite",
"thiserror", "thiserror 1.0.64",
] ]
[[package]] [[package]]
@ -5491,7 +5481,7 @@ dependencies = [
"opentelemetry-proto", "opentelemetry-proto",
"opentelemetry_sdk", "opentelemetry_sdk",
"prost 0.12.6", "prost 0.12.6",
"thiserror", "thiserror 1.0.64",
"tokio", "tokio",
"tonic", "tonic",
] ]
@ -5525,7 +5515,7 @@ dependencies = [
"ordered-float", "ordered-float",
"percent-encoding", "percent-encoding",
"rand", "rand",
"thiserror", "thiserror 1.0.64",
"tokio", "tokio",
"tokio-stream", "tokio-stream",
] ]
@ -5665,7 +5655,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fdbef9d1d47087a895abd220ed25eb4ad973a5e26f6a4367b038c25e28dfc2d9" checksum = "fdbef9d1d47087a895abd220ed25eb4ad973a5e26f6a4367b038c25e28dfc2d9"
dependencies = [ dependencies = [
"memchr", "memchr",
"thiserror", "thiserror 1.0.64",
"ucd-trie", "ucd-trie",
] ]
@ -5689,7 +5679,7 @@ dependencies = [
"pest_meta", "pest_meta",
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.79", "syn 2.0.90",
] ]
[[package]] [[package]]
@ -5806,7 +5796,7 @@ checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.79", "syn 2.0.90",
] ]
[[package]] [[package]]
@ -5952,7 +5942,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "479cf940fbbb3426c32c5d5176f62ad57549a0bb84773423ba8be9d089f5faba" checksum = "479cf940fbbb3426c32c5d5176f62ad57549a0bb84773423ba8be9d089f5faba"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"syn 2.0.79", "syn 2.0.90",
] ]
[[package]] [[package]]
@ -6015,9 +6005,9 @@ checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068"
[[package]] [[package]]
name = "proc-macro2" name = "proc-macro2"
version = "1.0.86" version = "1.0.92"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" checksum = "37d3544b3f2748c54e147655edb5025752e2303145b5aefb3c3ea2c78b973bb0"
dependencies = [ dependencies = [
"unicode-ident", "unicode-ident",
] ]
@ -6052,7 +6042,7 @@ dependencies = [
"itertools 0.12.1", "itertools 0.12.1",
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.79", "syn 2.0.90",
] ]
[[package]] [[package]]
@ -6065,7 +6055,7 @@ dependencies = [
"itertools 0.13.0", "itertools 0.13.0",
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.79", "syn 2.0.90",
] ]
[[package]] [[package]]
@ -6133,7 +6123,7 @@ dependencies = [
"rustc-hash 2.0.0", "rustc-hash 2.0.0",
"rustls 0.23.14", "rustls 0.23.14",
"socket2", "socket2",
"thiserror", "thiserror 1.0.64",
"tokio", "tokio",
"tracing", "tracing",
] ]
@ -6150,7 +6140,7 @@ dependencies = [
"rustc-hash 2.0.0", "rustc-hash 2.0.0",
"rustls 0.23.14", "rustls 0.23.14",
"slab", "slab",
"thiserror", "thiserror 1.0.64",
"tinyvec", "tinyvec",
"tracing", "tracing",
] ]
@ -6290,6 +6280,31 @@ dependencies = [
"url", "url",
] ]
[[package]]
name = "redis"
version = "0.27.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "09d8f99a4090c89cc489a94833c901ead69bfbf3877b4867d5482e321ee875bc"
dependencies = [
"arc-swap",
"async-trait",
"backon",
"bytes",
"combine",
"futures",
"futures-util",
"itertools 0.13.0",
"itoa",
"num-bigint",
"percent-encoding",
"pin-project-lite",
"ryu",
"sha1_smol",
"tokio",
"tokio-util",
"url",
]
[[package]] [[package]]
name = "redis-session-example" name = "redis-session-example"
version = "1.0.0" version = "1.0.0"
@ -6480,7 +6495,7 @@ checksum = "a5a11a05ee1ce44058fa3d5961d05194fdbe3ad6b40f904af764d81b86450e6b"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.79", "syn 2.0.90",
] ]
[[package]] [[package]]
@ -6806,7 +6821,7 @@ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"serde", "serde",
"syn 2.0.79", "syn 2.0.90",
"toml 0.8.19", "toml 0.8.19",
] ]
@ -6983,7 +6998,7 @@ checksum = "243902eda00fad750862fc144cea25caca5e20d615af0a81bee94ca738f1df1f"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.79", "syn 2.0.90",
] ]
[[package]] [[package]]
@ -7079,7 +7094,7 @@ dependencies = [
"darling", "darling",
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.79", "syn 2.0.90",
] ]
[[package]] [[package]]
@ -7388,7 +7403,7 @@ dependencies = [
"sha2", "sha2",
"smallvec", "smallvec",
"sqlformat", "sqlformat",
"thiserror", "thiserror 1.0.64",
"tokio", "tokio",
"tokio-stream", "tokio-stream",
"tracing", "tracing",
@ -7471,7 +7486,7 @@ dependencies = [
"smallvec", "smallvec",
"sqlx-core", "sqlx-core",
"stringprep", "stringprep",
"thiserror", "thiserror 1.0.64",
"tracing", "tracing",
"whoami", "whoami",
] ]
@ -7509,7 +7524,7 @@ dependencies = [
"smallvec", "smallvec",
"sqlx-core", "sqlx-core",
"stringprep", "stringprep",
"thiserror", "thiserror 1.0.64",
"tracing", "tracing",
"whoami", "whoami",
] ]
@ -7630,7 +7645,7 @@ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"rustversion", "rustversion",
"syn 2.0.79", "syn 2.0.90",
] ]
[[package]] [[package]]
@ -7662,9 +7677,9 @@ dependencies = [
[[package]] [[package]]
name = "syn" name = "syn"
version = "2.0.79" version = "2.0.90"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "89132cd0bf050864e1d38dc3bbc07a0eb8e7530af26344d3d2bbbef83499f590" checksum = "919d3b74a5dd0ccd15aeb8f93e7006bd9e14c295087c9896a110f490752bcf31"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
@ -7680,7 +7695,7 @@ dependencies = [
"proc-macro-error", "proc-macro-error",
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.79", "syn 2.0.90",
] ]
[[package]] [[package]]
@ -7706,7 +7721,7 @@ checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.79", "syn 2.0.90",
] ]
[[package]] [[package]]
@ -7900,7 +7915,16 @@ version = "1.0.64"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d50af8abc119fb8bb6dbabcfa89656f46f84aa0ac7688088608076ad2b459a84" checksum = "d50af8abc119fb8bb6dbabcfa89656f46f84aa0ac7688088608076ad2b459a84"
dependencies = [ dependencies = [
"thiserror-impl", "thiserror-impl 1.0.64",
]
[[package]]
name = "thiserror"
version = "2.0.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2f49a1853cf82743e3b7950f77e0f4d622ca36cf4317cba00c767838bac8d490"
dependencies = [
"thiserror-impl 2.0.4",
] ]
[[package]] [[package]]
@ -7911,7 +7935,18 @@ checksum = "08904e7672f5eb876eaaf87e0ce17857500934f4981c4a0ab2b4aa98baac7fc3"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.79", "syn 2.0.90",
]
[[package]]
name = "thiserror-impl"
version = "2.0.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8381894bb3efe0c4acac3ded651301ceee58a15d47c2e34885ed1908ad667061"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.90",
] ]
[[package]] [[package]]
@ -8043,7 +8078,7 @@ checksum = "8d9ef545650e79f30233c0003bcc2504d7efac6dad25fca40744de773fe2049c"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.79", "syn 2.0.90",
] ]
[[package]] [[package]]
@ -8097,7 +8132,7 @@ checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.79", "syn 2.0.90",
] ]
[[package]] [[package]]
@ -8315,7 +8350,7 @@ dependencies = [
"tokio", "tokio",
"tokio-rustls 0.25.0", "tokio-rustls 0.25.0",
"tokio-stream", "tokio-stream",
"tower", "tower 0.4.13",
"tower-layer", "tower-layer",
"tower-service", "tower-service",
"tracing", "tracing",
@ -8341,6 +8376,23 @@ dependencies = [
"tracing", "tracing",
] ]
[[package]]
name = "tower"
version = "0.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2873938d487c3cfb9aed7546dc9f2711d867c9f90c46b889989a2cb84eba6b4f"
dependencies = [
"futures-core",
"futures-util",
"pin-project-lite",
"sync_wrapper 0.1.2",
"tokio",
"tokio-util",
"tower-layer",
"tower-service",
"tracing",
]
[[package]] [[package]]
name = "tower-layer" name = "tower-layer"
version = "0.3.3" version = "0.3.3"
@ -8388,7 +8440,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.79", "syn 2.0.90",
] ]
[[package]] [[package]]
@ -8648,7 +8700,7 @@ checksum = "1ed7f4237ba393424195053097c1516bd4590dc82b84f2f97c5c69e12704555b"
dependencies = [ dependencies = [
"proc-macro-hack", "proc-macro-hack",
"quote", "quote",
"syn 2.0.79", "syn 2.0.90",
"unic-langid-impl", "unic-langid-impl",
] ]
@ -8863,7 +8915,7 @@ dependencies = [
"proc-macro-error", "proc-macro-error",
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.79", "syn 2.0.90",
] ]
[[package]] [[package]]
@ -8943,7 +8995,7 @@ dependencies = [
"once_cell", "once_cell",
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.79", "syn 2.0.90",
"wasm-bindgen-shared", "wasm-bindgen-shared",
] ]
@ -8977,7 +9029,7 @@ checksum = "afc340c74d9005395cf9dd098506f7f44e38f2b4a21c6aaacf9a105ea5e1e836"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.79", "syn 2.0.90",
"wasm-bindgen-backend", "wasm-bindgen-backend",
"wasm-bindgen-shared", "wasm-bindgen-shared",
] ]
@ -9604,7 +9656,7 @@ checksum = "2380878cad4ac9aac1e2435f3eb4020e8374b5f13c296cb75b4620ff8e229154"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.79", "syn 2.0.90",
"synstructure", "synstructure",
] ]
@ -9626,7 +9678,7 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.79", "syn 2.0.90",
] ]
[[package]] [[package]]
@ -9646,7 +9698,7 @@ checksum = "595eed982f7d355beb85837f651fa22e90b3c044842dc7f2c2842c086f295808"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.79", "syn 2.0.90",
"synstructure", "synstructure",
] ]
@ -9667,7 +9719,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.79", "syn 2.0.90",
] ]
[[package]] [[package]]
@ -9689,7 +9741,7 @@ checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.79", "syn 2.0.90",
] ]
[[package]] [[package]]

View File

@ -6,8 +6,8 @@ edition = "2021"
[dependencies] [dependencies]
actix-web.workspace = true actix-web.workspace = true
apalis = { version = "0.6.0-rc.2" } apalis = { version = "0.6", features = ["limit"] }
apalis-redis = { version = "0.6.0-rc.2" } apalis-redis = { version = "0.6" }
chrono.workspace = true chrono.workspace = true
color-eyre.workspace = true color-eyre.workspace = true
dotenvy.workspace = true dotenvy.workspace = true

View File

@ -34,15 +34,13 @@ pub(crate) async fn start_processing_email_queue() -> eyre::Result<RedisStorage<
let storage = RedisStorage::new_with_config(conn, config); let storage = RedisStorage::new_with_config(conn, config);
// create unmonitored workers for handling emails // create unmonitored workers for handling emails
let workers = WorkerBuilder::new("job-handler") let worker = WorkerBuilder::new("job-handler")
.concurrency(2)
.backend(storage.clone()) .backend(storage.clone())
.build_fn(process_email_job) .build_fn(process_email_job);
.with_executor_instances(2, TokioExecutor);
for worker in workers {
#[allow(clippy::let_underscore_future)] #[allow(clippy::let_underscore_future)]
let _ = tokio::spawn(worker.run()); let _ = tokio::spawn(worker.run());
}
Ok(storage) Ok(storage)
} }