From 12ec11308411584ed0d0a95cbacd01070e4e7bf9 Mon Sep 17 00:00:00 2001 From: Emulator000 Date: Fri, 27 Nov 2020 19:01:43 +0100 Subject: [PATCH] Updated all libraries to the last version including the compiler and changed the default logging system with a more advanced one --- Cargo.lock | 595 +++++++++++++----------------- Cargo.toml | 13 +- src/client/consumer/channel.rs | 5 +- src/client/consumer/connection.rs | 5 +- src/client/consumer/message.rs | 47 +-- src/client/consumer/mod.rs | 40 +- src/client/mod.rs | 15 +- src/config/database/mod.rs | 5 +- src/config/mod.rs | 3 +- src/lib.rs | 3 +- src/logger/mod.rs | 11 - src/main.rs | 28 +- src/utils.rs | 4 +- 13 files changed, 330 insertions(+), 444 deletions(-) delete mode 100644 src/logger/mod.rs diff --git a/Cargo.lock b/Cargo.lock index 3581e35..6c5c6c7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,18 +2,18 @@ # It is not intended for manual editing. [[package]] name = "aho-corasick" -version = "0.7.14" +version = "0.7.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b476ce7103678b0c6d3d395dbbae31d48ff910bd28be979ba5d48c6351131d0d" +checksum = "7404febffaa47dac81aa44dba71523c9d069b1bdc50a77db41195149e17f68e5" dependencies = [ "memchr", ] [[package]] name = "amq-protocol" -version = "6.0.0-rc12" +version = "6.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a582e9acd2b9c950e0199f362b50adc2dd50df19b80b6ff21e6f665f9ffec1a" +checksum = "ede228647914ef8ac4ef4cfddbe3be4c23afea8d8c7f95451a2f53efe6ce8f2f" dependencies = [ "amq-protocol-tcp", "amq-protocol-types", @@ -24,20 +24,20 @@ dependencies = [ [[package]] name = "amq-protocol-tcp" -version = "6.0.0-rc12" +version = "6.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08a78f63c0f5687fad9e568308a0e47dbf67284169989720041a1776da2a2a54" +checksum = "4860b3d63ffb63b3ed440b78ccd549b009e0f72d995b9e9aec51e8e1af01e694" dependencies = [ "amq-protocol-uri", - "log", "tcp-stream", + "tracing", ] [[package]] name = "amq-protocol-types" -version = "6.0.0-rc12" +version = "6.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79ba245d2b7aff08d8d282e599b464d39374562558978441ba79dbf2c4144c1f" +checksum = "73ebe159bbe5fff48b5702d639ba9b0a7b1b2f24c4404fe38db0cbcafd057c01" dependencies = [ "cookie-factory", "nom", @@ -47,12 +47,12 @@ dependencies = [ [[package]] name = "amq-protocol-uri" -version = "6.0.0-rc12" +version = "6.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d04a3088d68efdc84895ccf27af671d553807a713c1f33f0e2ee35c19ddc593" +checksum = "f82403806f8fef7e9d8dc6dcb41839a47a8eab9419f9dca52ef6b19904e0047e" dependencies = [ "percent-encoding 2.1.0", - "url 2.1.1", + "url 2.2.0", ] [[package]] @@ -61,20 +61,14 @@ version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b" dependencies = [ - "winapi 0.3.9", + "winapi", ] -[[package]] -name = "arc-swap" -version = "0.4.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d25d88fd6b8041580a654f9d0c581a047baee2b3efee13275f2fc392fc75034" - [[package]] name = "arrayvec" -version = "0.5.1" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cff77d8686867eceff3105329d4698d96c2391c176d5d03adc90c7389162b5b8" +checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" [[package]] name = "async-channel" @@ -89,9 +83,9 @@ dependencies = [ [[package]] name = "async-executor" -version = "1.3.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d373d78ded7d0b3fa8039375718cde0aace493f2e34fb60f51cbf567562ca801" +checksum = "eb877970c7b440ead138f6321a3b5395d6061183af779340b65e20c0fede9146" dependencies = [ "async-task", "concurrent-queue", @@ -103,9 +97,9 @@ dependencies = [ [[package]] name = "async-global-executor" -version = "1.3.0" +version = "1.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fefeb39da249f4c33af940b779a56723ce45809ef5c54dad84bb538d4ffb6d9e" +checksum = "73079b49cd26b8fd5a15f68fc7707fc78698dc2a3d61430f2a7a9430230dfa04" dependencies = [ "async-executor", "async-io", @@ -116,9 +110,9 @@ dependencies = [ [[package]] name = "async-io" -version = "1.1.10" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d54bc4c1c7292475efb2253227dbcfad8fe1ca4c02bc62c510cc2f3da5c4704e" +checksum = "40a0b2bb8ae20fede194e779150fe283f65a4a08461b496de546ec366b174ad9" dependencies = [ "concurrent-queue", "fastrand", @@ -131,7 +125,7 @@ dependencies = [ "polling", "vec-arena", "waker-fn", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -145,9 +139,9 @@ dependencies = [ [[package]] name = "async-std" -version = "1.6.5" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9fa76751505e8df1c7a77762f60486f60c71bbd9b8557f4da6ad47d083732ed" +checksum = "a7e82538bc65a25dbdff70e4c5439d52f068048ab97cdea0acd73f131594caa1" dependencies = [ "async-global-executor", "async-io", @@ -164,7 +158,7 @@ dependencies = [ "memchr", "num_cpus", "once_cell", - "pin-project-lite", + "pin-project-lite 0.1.11", "pin-utils", "slab", "wasm-bindgen-futures", @@ -172,9 +166,9 @@ dependencies = [ [[package]] name = "async-task" -version = "4.0.2" +version = "4.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ab27c1aa62945039e44edaeee1dc23c74cc0c303dd5fe0fb462a184f1c3a518" +checksum = "e91831deabf0d6d7ec49552e489aed63b7456a7a3c46cff62adad428110b0af0" [[package]] name = "atomic-waker" @@ -190,7 +184,7 @@ checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" dependencies = [ "hermit-abi", "libc", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -201,19 +195,9 @@ checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" [[package]] name = "base64" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "489d6c0ed21b11d038c31b6ceccca973e65d73ba3bd8ecb9a2babf5546164643" -dependencies = [ - "byteorder", - "safemem", -] - -[[package]] -name = "base64" -version = "0.12.3" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3441f0f7b02788e948e47f457ca01f1d7e6d92c693bc132c22b087d3141c03ff" +checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd" [[package]] name = "bitflags" @@ -221,6 +205,18 @@ version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" +[[package]] +name = "bitvec" +version = "0.19.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7ba35e9565969edb811639dbebfe34edc0368e472c5018474c8eb2543397f81" +dependencies = [ + "funty", + "radium", + "tap", + "wyz", +] + [[package]] name = "blocking" version = "1.0.2" @@ -249,9 +245,9 @@ checksum = "08c48aae112d48ed9f069b33538ea9e3e90aa263cfa3d1c24309612b1f7472de" [[package]] name = "bytes" -version = "0.5.6" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e4cec68f03f32e44924783795810fa50a7035d8c8ebe78580ad7e6c703fba38" +checksum = "e0dcbc35f504eb6fc275a6d20e4ebcda18cf50d40ba6fabff8c711fa16cb3b16" [[package]] name = "cache-padded" @@ -261,9 +257,9 @@ checksum = "631ae5198c9be5e753e5cc215e1bd73c2b466a3565173db433f52bb9d3e66dba" [[package]] name = "cc" -version = "1.0.61" +version = "1.0.65" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed67cbde08356238e75fc4656be4749481eeffb09e19f320a25237d5221c985d" +checksum = "95752358c8f7552394baf48cd82695b345628ad3f170d607de3ca03b8dacca15" [[package]] name = "cfg-if" @@ -271,6 +267,12 @@ version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" +[[package]] +name = "cfg-if" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + [[package]] name = "chrono" version = "0.4.19" @@ -282,7 +284,7 @@ dependencies = [ "num-traits", "serde", "time", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -326,9 +328,9 @@ checksum = "41f21b581d2f0cb891554812435667bb9610d74feb1a4c6415bf09c28ff0381d" [[package]] name = "core-foundation" -version = "0.7.0" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57d24c7a13c43e870e37c1556b74555437870a04514f7685f5b354e090567171" +checksum = "0a89e2ae426ea83155dccf10c0fa6b1463ef6d5fcb44cee0b224a408fa640a62" dependencies = [ "core-foundation-sys", "libc", @@ -336,36 +338,36 @@ dependencies = [ [[package]] name = "core-foundation-sys" -version = "0.7.0" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3a71ab494c0b5b860bdc8407ae08978052417070c2ced38573a9157ad75b8ac" +checksum = "ea221b5284a47e40033bf9b66f35f984ec0ea2931eb03505246cd27a963f981b" [[package]] name = "crossbeam-channel" -version = "0.4.4" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b153fe7cbef478c567df0f972e02e6d736db11affe43dfc9c56a9374d1adfb87" +checksum = "dca26ee1f8d361640700bde38b2c37d8c22b3ce2d360e1fc1c74ea4b0aa7d775" dependencies = [ + "cfg-if 1.0.0", "crossbeam-utils", - "maybe-uninit", ] [[package]] name = "crossbeam-utils" -version = "0.7.2" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3c7c73a2d1e9fc0886a08b93e98eb643461230d5f1925e4036204d5f2e261a8" +checksum = "02d96d1e189ef58269ebe5b97953da3274d83a93af647c2ddd6f9dab28cedb8d" dependencies = [ "autocfg", - "cfg-if", + "cfg-if 1.0.0", "lazy_static", ] [[package]] name = "crystalsoft-utils" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b3f6b24ef8d01acc8d01ce246a959c77b0f6099d56b80a4db012bf36603ecf2" +checksum = "85a8ec66fa7486297a4e828f5cabe4e34a4b4934058010753767421bd3717ad7" [[package]] name = "diesel" @@ -400,9 +402,9 @@ checksum = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10" [[package]] name = "env_logger" -version = "0.7.1" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44533bbbb3bb3c1fa17d9f2e4e38bbbaf8396ba82193c4cb1b6445d711445d36" +checksum = "f26ecb66b4bdca6c1409b40fb255eefc2bd4f6d135dab3c3124f80ffa2a9661e" dependencies = [ "atty", "humantime", @@ -426,12 +428,6 @@ dependencies = [ "instant", ] -[[package]] -name = "fnv" -version = "1.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" - [[package]] name = "foreign-types" version = "0.3.2" @@ -448,26 +444,26 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" [[package]] -name = "fuchsia-zircon" -version = "0.3.3" +name = "form_urlencoded" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82" +checksum = "ece68d15c92e84fa4f19d3780f1294e5ca82a78a6d515f1efaabcc144688be00" dependencies = [ - "bitflags", - "fuchsia-zircon-sys", + "matches", + "percent-encoding 2.1.0", ] [[package]] -name = "fuchsia-zircon-sys" -version = "0.3.3" +name = "funty" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" +checksum = "0ba62103ce691c2fd80fbae2213dfdda9ce60804973ac6b6e97de818ea7f52c8" [[package]] name = "futures" -version = "0.3.6" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d8e3078b7b2a8a671cb7a3d17b4760e4181ea243227776ba83fd043b4ca034e" +checksum = "9b3b0c040a1fe6529d30b3c5944b280c7f0dcb2930d2c3062bca967b602583d0" dependencies = [ "futures-channel", "futures-core", @@ -480,9 +476,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.6" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7a4d35f7401e948629c9c3d6638fb9bf94e0b2121e96c3b428cc4e631f3eb74" +checksum = "4b7109687aa4e177ef6fe84553af6280ef2778bdb7783ba44c9dc3399110fe64" dependencies = [ "futures-core", "futures-sink", @@ -490,15 +486,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.6" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d674eaa0056896d5ada519900dbf97ead2e46a7b6621e8160d79e2f2e1e2784b" +checksum = "847ce131b72ffb13b6109a221da9ad97a64cbe48feb1028356b836b47b8f1748" [[package]] name = "futures-executor" -version = "0.3.6" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc709ca1da6f66143b8c9bec8e6260181869893714e9b5a490b169b0414144ab" +checksum = "4caa2b2b68b880003057c1dd49f1ed937e38f22fcf6c212188a121f08cf40a65" dependencies = [ "futures-core", "futures-task", @@ -507,30 +503,30 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.6" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fc94b64bb39543b4e432f1790b6bf18e3ee3b74653c5449f63310e9a74b123c" +checksum = "611834ce18aaa1bd13c4b374f5d653e1027cf99b6b502584ff8c9a64413b30bb" [[package]] name = "futures-lite" -version = "1.11.1" +version = "1.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "381a7ad57b1bad34693f63f6f377e1abded7a9c85c9d3eb6771e11c60aaadab9" +checksum = "5e6c079abfac3ab269e2927ec048dabc89d009ebfdda6b8ee86624f30c689658" dependencies = [ "fastrand", "futures-core", "futures-io", "memchr", "parking", - "pin-project-lite", + "pin-project-lite 0.1.11", "waker-fn", ] [[package]] name = "futures-macro" -version = "0.3.6" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f57ed14da4603b2554682e9f2ff3c65d7567b53188db96cb71538217fc64581b" +checksum = "77408a692f1f97bcc61dc001d752e00643408fbc922e4d634c655df50d595556" dependencies = [ "proc-macro-hack", "proc-macro2", @@ -540,24 +536,24 @@ dependencies = [ [[package]] name = "futures-sink" -version = "0.3.6" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d8764258ed64ebc5d9ed185cf86a95db5cac810269c5d20ececb32e0088abbd" +checksum = "f878195a49cee50e006b02b93cf7e0a95a38ac7b776b4c4d9cc1207cd20fcb3d" [[package]] name = "futures-task" -version = "0.3.6" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dd26820a9f3637f1302da8bceba3ff33adbe53464b54ca24d4e2d4f1db30f94" +checksum = "7c554eb5bf48b2426c4771ab68c6b14468b6e76cc90996f528c3338d761a4d0d" dependencies = [ "once_cell", ] [[package]] name = "futures-util" -version = "0.3.6" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a894a0acddba51a2d49a6f4263b1e64b8c579ece8af50fa86503d52cd1eea34" +checksum = "d304cff4a7b99cfb7986f7d43fbe93d175e72e704a8860787cc95e9ffd85cbd2" dependencies = [ "futures-channel", "futures-core", @@ -579,7 +575,7 @@ version = "0.1.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fc587bc0ec293155d5bfa6b9891ec18a1e330c234f896ea47fbada4cadbe47e6" dependencies = [ - "cfg-if", + "cfg-if 0.1.10", "libc", "wasi 0.9.0+wasi-snapshot-preview1", ] @@ -608,12 +604,9 @@ dependencies = [ [[package]] name = "humantime" -version = "1.3.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df004cfca50ef23c36850aaaa59ad52cc70d0e90243c3c7737a4dd32dc7a3c4f" -dependencies = [ - "quick-error", -] +checksum = "3c1ad908cc71012b7bea4d0c53ba96a8cba9962f048fa68d143376143d863b7a" [[package]] name = "idna" @@ -639,20 +632,11 @@ dependencies = [ [[package]] name = "instant" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63312a18f7ea8760cdd0a7c5aac1a619752a246b833545e3e36d1f81f7cd9e66" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "iovec" -version = "0.1.4" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2b3ea6ff95e175473f8ffe6a7eb7c00d054240321b84c57051175fe3c1e075e" +checksum = "61124eeebbd69b8190558df225adf7e4caafce0d743919e5d6b19652314ec5ec" dependencies = [ - "libc", + "cfg-if 1.0.0", ] [[package]] @@ -670,16 +654,6 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "kernel32-sys" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" -dependencies = [ - "winapi 0.2.8", - "winapi-build", -] - [[package]] name = "kv-log-macro" version = "1.0.7" @@ -691,18 +665,19 @@ dependencies = [ [[package]] name = "lapin" -version = "1.4.1" +version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e54e5cfd9393c574159e44c9049fb621325e6c7560f4a506a44e2139a8cf1a8" +checksum = "a04173b1524419f51c00c2f0f0e7b52bb9cd2e5bd9ea030da8bee086bda7e7b2" dependencies = [ "amq-protocol", "async-task", "crossbeam-channel", "futures-core", "log", - "mio 0.7.3", + "mio", "parking_lot", "pinky-swear", + "serde", ] [[package]] @@ -719,22 +694,22 @@ checksum = "db65c6da02e61f55dae90a0ae427b2a5f6b3e8db09f58d10efab23af92592616" dependencies = [ "arrayvec", "bitflags", - "cfg-if", + "cfg-if 0.1.10", "ryu", "static_assertions", ] [[package]] name = "libc" -version = "0.2.79" +version = "0.2.80" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2448f6066e80e3bfc792e9c98bf705b4b0fc6e8ef5b43e5889aff0eaa9c58743" +checksum = "4d58d1b70b004888f764dfbf6a26a3b0342a1632d33968e4a179d8011c760614" [[package]] name = "lock_api" -version = "0.4.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28247cc5a5be2f05fbcd76dd0cf2c7d3b5400cb978a28042abcd4fa0b3f8261c" +checksum = "dd96ffd135b2fd7b973ac026d28085defbe8983df057ced3eb4f2130b0831312" dependencies = [ "scopeguard", ] @@ -745,7 +720,7 @@ version = "0.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4fabed175da42fed1fa0746b0ea71f412aa9d35e76e95e59b192c64b9dc2bf8b" dependencies = [ - "cfg-if", + "cfg-if 0.1.10", ] [[package]] @@ -754,93 +729,33 @@ version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08" -[[package]] -name = "maybe-uninit" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60302e4db3a61da70c0cb7991976248362f30319e88850c487b9b95bbf059e00" - [[package]] name = "memchr" -version = "2.3.3" +version = "2.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3728d817d99e5ac407411fa471ff9800a778d88a24685968b36824eaf4bee400" - -[[package]] -name = "mio" -version = "0.6.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fce347092656428bc8eaf6201042cb551b8d67855af7374542a92a0fbfcac430" -dependencies = [ - "cfg-if", - "fuchsia-zircon", - "fuchsia-zircon-sys", - "iovec", - "kernel32-sys", - "libc", - "log", - "miow 0.2.1", - "net2", - "slab", - "winapi 0.2.8", -] +checksum = "0ee1c47aaa256ecabcaea351eae4a9b01ef39ed810004e298d2511ed284b1525" [[package]] name = "mio" -version = "0.7.3" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e53a6ea5f38c0a48ca42159868c6d8e1bd56c0451238856cc08d58563643bdc3" +checksum = "f33bc887064ef1fd66020c9adfc45bb9f33d75a42096c81e7c56c65b75dd1a8b" dependencies = [ "libc", "log", - "miow 0.3.5", + "miow", "ntapi", - "winapi 0.3.9", -] - -[[package]] -name = "mio-named-pipes" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0840c1c50fd55e521b247f949c241c9997709f23bd7f023b9762cd561e935656" -dependencies = [ - "log", - "mio 0.6.22", - "miow 0.3.5", - "winapi 0.3.9", -] - -[[package]] -name = "mio-uds" -version = "0.6.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afcb699eb26d4332647cc848492bbc15eafb26f08d0304550d5aa1f612e066f0" -dependencies = [ - "iovec", - "libc", - "mio 0.6.22", -] - -[[package]] -name = "miow" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c1f2f3b1cf331de6896aabf6e9d55dca90356cc9960cca7eaaf408a355ae919" -dependencies = [ - "kernel32-sys", - "net2", - "winapi 0.2.8", - "ws2_32-sys", + "winapi", ] [[package]] name = "miow" -version = "0.3.5" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07b88fb9795d4d36d62a012dfbf49a8f5cf12751f36d31a9dbe66d528e58979e" +checksum = "5a33c1b55807fbed163481b5ba66db4b2fa6cde694a5027be10fb724206c5897" dependencies = [ "socket2", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -855,9 +770,9 @@ dependencies = [ [[package]] name = "native-tls" -version = "0.2.4" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b0d88c06fe90d5ee94048ba40409ef1d9315d86f6f38c2efdaad4fb50c58b2d" +checksum = "6fcc7939b5edc4e4f86b1b4a04bb1498afaaf871b1a6691838ed06fcb48d3a3f" dependencies = [ "lazy_static", "libc", @@ -878,26 +793,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8123a81538e457d44b933a02faf885d3fe8408806b23fa700e8f01c6c3a98998" dependencies = [ "libc", - "winapi 0.3.9", -] - -[[package]] -name = "net2" -version = "0.2.35" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ebc3ec692ed7c9a255596c67808dee269f64655d8baf7b4f0638e51ba1d6853" -dependencies = [ - "cfg-if", - "libc", - "winapi 0.3.9", + "winapi", ] [[package]] name = "nom" -version = "6.0.0-alpha1" +version = "6.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25020779544bf717b917323b42f23c9dbef1bd2b97b576df6484a0c8709705c6" +checksum = "88034cfd6b4a0d54dd14f4a507eceee36c0b70e5a02236c4e4df571102be17f0" dependencies = [ + "bitvec", "lexical-core", "memchr", "version_check", @@ -905,18 +810,18 @@ dependencies = [ [[package]] name = "ntapi" -version = "0.3.4" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a31937dea023539c72ddae0e3571deadc1414b300483fa7aaec176168cfa9d2" +checksum = "3f6bb902e437b6d86e03cce10a7e2af662292c5dfef23b65899ea3ac9354ad44" dependencies = [ - "winapi 0.3.9", + "winapi", ] [[package]] name = "num-integer" -version = "0.1.43" +version = "0.1.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d59457e662d541ba17869cf51cf177c0b5f0cbf476c66bdc90bf1edac4f875b" +checksum = "d2cc698a63b549a70bc047073d2949cce27cd1c7b0a4a862d08a8031bc2801db" dependencies = [ "autocfg", "num-traits", @@ -924,9 +829,9 @@ dependencies = [ [[package]] name = "num-traits" -version = "0.2.12" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac267bcc07f48ee5f8935ab0d24f316fb722d7a1292e2913f0cc196b29ffd611" +checksum = "9a64b1ec5cda2586e284722486d802acf1f7dbdc623e2bfc57e65ca1cd099290" dependencies = [ "autocfg", ] @@ -943,9 +848,9 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.4.1" +version = "1.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "260e51e7efe62b592207e9e13a68e43692a7a279171d6ba57abd208bf23645ad" +checksum = "13bd41f508810a131401606d54ac32a467c97172d74ba7662562ebba5ad07fa0" [[package]] name = "openssl" @@ -954,7 +859,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8d575eff3665419f9b83678ff2815858ad9d11567e082f5ac1814baba4e2bcb4" dependencies = [ "bitflags", - "cfg-if", + "cfg-if 0.1.10", "foreign-types", "lazy_static", "libc", @@ -988,9 +893,9 @@ checksum = "427c3892f9e783d91cc128285287e70a59e206ca452770ece88a76f7a3eddd72" [[package]] name = "parking_lot" -version = "0.11.0" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4893845fa2ca272e647da5d0e46660a314ead9c2fdd9a883aabc32e481a8733" +checksum = "6d7744ac029df22dca6284efe4e898991d28e3085c706c972bcd7da4a27a15eb" dependencies = [ "instant", "lock_api", @@ -1003,22 +908,22 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c361aa727dd08437f2f1447be8b59a33b0edd15e0fcee698f935613d9efbca9b" dependencies = [ - "cfg-if", + "cfg-if 0.1.10", "cloudabi", "instant", "libc", "redox_syscall", "smallvec", - "winapi 0.3.9", + "winapi", ] [[package]] name = "pem" -version = "0.8.1" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59698ea79df9bf77104aefd39cc3ec990cb9693fb59c3b0a70ddf2646fdffb4b" +checksum = "f4c220d01f863d13d96ca82359d1e81e64a7c6bf0637bcde7b2349630addf0c6" dependencies = [ - "base64 0.12.3", + "base64", "once_cell", "regex", ] @@ -1037,18 +942,18 @@ checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" [[package]] name = "pin-project" -version = "0.4.27" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ffbc8e94b38ea3d2d8ba92aea2983b503cd75d0888d75b86bb37970b5698e15" +checksum = "9ccc2237c2c489783abd8c4c80e5450fc0e98644555b1364da68cc29aa151ca7" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "0.4.27" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65ad2ae56b6abe3a1ee25f15ee605bacadb9a764edaba9c2bf4103800d4a1895" +checksum = "f8e8d2bf0b23038a4424865103a4df472855692821aab4e4f5c3312d461d9e5f" dependencies = [ "proc-macro2", "quote", @@ -1057,9 +962,15 @@ dependencies = [ [[package]] name = "pin-project-lite" -version = "0.1.10" +version = "0.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c917123afa01924fc84bb20c4c03f004d9c38e5127e3c039bbf7f4b9c76a2f6b" + +[[package]] +name = "pin-project-lite" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e555d9e657502182ac97b539fb3dae8b79cda19e3e4f8ffb5e8de4f18df93c95" +checksum = "6b063f57ec186e6140e2b8b6921e5f1bd89c7356dda5b33acc5401203ca6131c" [[package]] name = "pin-utils" @@ -1086,28 +997,28 @@ checksum = "3831453b3449ceb48b6d9c7ad7c96d5ea673e9b470a1dc578c2ce6521230884c" [[package]] name = "polling" -version = "2.0.1" +version = "2.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab773feb154f12c49ffcfd66ab8bdcf9a1843f950db48b0d8be9d4393783b058" +checksum = "a2a7bc6b2a29e632e45451c941832803a18cce6781db04de8a04696cdca8bde4" dependencies = [ - "cfg-if", + "cfg-if 0.1.10", "libc", "log", "wepoll-sys", - "winapi 0.3.9", + "winapi", ] [[package]] name = "ppv-lite86" -version = "0.2.9" +version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c36fa947111f5c62a733b652544dd0016a43ce89619538a8ef92724a6f501a20" +checksum = "ac74c624d6b2d21f425f752262f42188365d7b8ff1aff74c82e45136510a4857" [[package]] name = "proc-macro-hack" -version = "0.5.18" +version = "0.5.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99c605b9a0adc77b7211c6b1f722dcb613d68d66859a44f3d485a6da332b0598" +checksum = "dbf0c48bc1d91375ae5c3cd81e3722dff1abcf81a30960240640d223f59fe0e5" [[package]] name = "proc-macro-nested" @@ -1124,12 +1035,6 @@ dependencies = [ "unicode-xid", ] -[[package]] -name = "quick-error" -version = "1.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" - [[package]] name = "quote" version = "1.0.7" @@ -1152,10 +1057,10 @@ dependencies = [ [[package]] name = "rabbitmq-consumer" -version = "1.0.3" +version = "1.1.0" dependencies = [ "async-std", - "base64 0.9.3", + "base64", "chrono", "clap", "crystalsoft-utils", @@ -1163,12 +1068,19 @@ dependencies = [ "env_logger", "futures", "lapin", + "log", "serde", "serde_derive", "tokio", "toml", ] +[[package]] +name = "radium" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "941ba9d78d8e2f7ce474c015eea4d9c6d25b6a3327f9832ee29a4de27f91bbb8" + [[package]] name = "rand" version = "0.7.3" @@ -1218,9 +1130,9 @@ checksum = "41cc0f7e4d5d4544e8861606a285bb08d3e70712ccc7d2b84d7c0ccfaf4b05ce" [[package]] name = "regex" -version = "1.4.0" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36f45b719a674bf4b828ff318906d6c133264c793eff7a41e30074a45b5099e2" +checksum = "38cf2c13ed4745de91a5eb834e11c00bcc3709e773173b2ce4c56c9fbde04b9c" dependencies = [ "aho-corasick", "memchr", @@ -1230,9 +1142,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.6.19" +version = "0.6.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c17be88d9eaa858870aa5e48cc406c206e4600e983fc4f06bbe5750d93d09761" +checksum = "3b181ba2dcf07aaccad5448e8ead58db5b742cf85dfe035e2227f137a539a189" [[package]] name = "remove_dir_all" @@ -1240,7 +1152,7 @@ version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7" dependencies = [ - "winapi 0.3.9", + "winapi", ] [[package]] @@ -1249,12 +1161,6 @@ version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "71d301d4193d031abdd79ff7e3dd721168a9572ef3fe51a1517aba235bd8f86e" -[[package]] -name = "safemem" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef703b7cb59335eae2eb93ceb664c0eb7ea6bf567079d843e09420219668e072" - [[package]] name = "schannel" version = "0.1.19" @@ -1262,7 +1168,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f05ba609c234e60bee0d547fe94a4c7e9da733d1c962cf6e59efa4cd9c8bc75" dependencies = [ "lazy_static", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -1282,9 +1188,9 @@ checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" [[package]] name = "security-framework" -version = "0.4.4" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64808902d7d99f78eaddd2b4e2509713babc3dc3c85ad6f4c447680f3c01e535" +checksum = "c1759c2e3c8580017a484a7ac56d3abc5a6c1feadf88db2f3633f12ae4268c69" dependencies = [ "bitflags", "core-foundation", @@ -1295,9 +1201,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "0.4.3" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17bf11d99252f512695eb468de5516e5cf75455521e69dfe343f3b74e4748405" +checksum = "f99b9d5e26d2a71633cc4f2ebae7cc9f874044e0c351a27e17892d76dce5678b" dependencies = [ "core-foundation-sys", "libc", @@ -1305,18 +1211,18 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.116" +version = "1.0.117" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96fe57af81d28386a513cbc6858332abc6117cfdb5999647c6444b8f43a370a5" +checksum = "b88fa983de7720629c9387e9f517353ed404164b1e482c970a90c1a4aaf7dc1a" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.116" +version = "1.0.117" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f630a6370fd8e457873b4bd2ffdae75408bc291ba72be773772a4c2a065d9ae8" +checksum = "cbd1ae72adb44aab48f325a02444a5fc079349a8d804c1fc922aed3f7454c74e" dependencies = [ "proc-macro2", "quote", @@ -1336,11 +1242,10 @@ dependencies = [ [[package]] name = "signal-hook-registry" -version = "1.2.1" +version = "1.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3e12110bc539e657a646068aaf5eb5b63af9d0c1f7b29c97113fad80e15f035" +checksum = "ce32ea0c6c56d5eacaeb814fbed9960547021d3edd010ded1425f180536b20ab" dependencies = [ - "arc-swap", "libc", ] @@ -1352,20 +1257,20 @@ checksum = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8" [[package]] name = "smallvec" -version = "1.4.2" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbee7696b84bbf3d89a1c2eccff0850e3047ed46bfcd2e92c29a2d074d57e252" +checksum = "7acad6f34eb9e8a259d3283d1e8c1d34d7415943d4895f65cc73813c7396fc85" [[package]] name = "socket2" -version = "0.3.15" +version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1fa70dc5c8104ec096f4fe7ede7a221d35ae13dcd19ba1ad9a81d2cab9a1c44" +checksum = "2c29947abdee2a218277abeca306f25789c938e500ea5a9d4b12a5a504466902" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "libc", "redox_syscall", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -1382,23 +1287,29 @@ checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" [[package]] name = "syn" -version = "1.0.44" +version = "1.0.51" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e03e57e4fcbfe7749842d53e24ccb9aa12b7252dbe5e91d2acad31834c8b8fdd" +checksum = "3b4f34193997d92804d359ed09953e25d5138df6bcc055a71bf68ee89fdf9223" dependencies = [ "proc-macro2", "quote", "unicode-xid", ] +[[package]] +name = "tap" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "36474e732d1affd3a6ed582781b3683df3d0563714c59c39591e8ff707cf078e" + [[package]] name = "tcp-stream" -version = "0.20.3" +version = "0.20.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d147f992a9942eb288eb52f58ba1868eee976d4983f2013867fde3736c52d0c" +checksum = "04c180af0da0f0a75ca080465175892fcdaa750076f125cb953127721e676413" dependencies = [ - "cfg-if", - "mio 0.7.3", + "cfg-if 1.0.0", + "mio", "native-tls", "pem", ] @@ -1409,19 +1320,19 @@ version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a6e24d9338a0a5be79593e2fa15a648add6138caa803e2d5bc782c371732ca9" dependencies = [ - "cfg-if", + "cfg-if 0.1.10", "libc", "rand", "redox_syscall", "remove_dir_all", - "winapi 0.3.9", + "winapi", ] [[package]] name = "termcolor" -version = "1.1.0" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb6bfa289a4d7c5766392812c0a1f4c1ba45afa1ad47803c11e1f407d846d75f" +checksum = "2dfed899f0eb03f32ee8c6a0aabdb8a7949659e3466561fc0adf54e26d88c5f4" dependencies = [ "winapi-util", ] @@ -1452,44 +1363,51 @@ checksum = "6db9e6914ab8b1ae1c260a4ae7a49b6c5611b40328a735b21862567685e73255" dependencies = [ "libc", "wasi 0.10.0+wasi-snapshot-preview1", - "winapi 0.3.9", + "winapi", ] [[package]] name = "tinyvec" -version = "0.3.4" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccf8dbc19eb42fba10e8feaaec282fb50e2c14b2726d6301dbfeed0f73306a6f" +dependencies = [ + "tinyvec_macros", +] + +[[package]] +name = "tinyvec_macros" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "238ce071d267c5710f9d31451efec16c5ee22de34df17cc05e56cbc92e967117" +checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" [[package]] name = "tokio" -version = "0.2.22" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d34ca54d84bf2b5b4d7d31e901a8464f7b60ac145a284fba25ceb801f2ddccd" +checksum = "9dfe2523e6fa84ddf5e688151d4e5fddc51678de9752c6512a24714c23818d61" dependencies = [ + "autocfg", "bytes", - "fnv", "futures-core", - "iovec", "lazy_static", "libc", "memchr", - "mio 0.6.22", - "mio-named-pipes", - "mio-uds", + "mio", "num_cpus", - "pin-project-lite", + "parking_lot", + "pin-project-lite 0.2.0", "signal-hook-registry", "slab", "tokio-macros", - "winapi 0.3.9", + "winapi", ] [[package]] name = "tokio-macros" -version = "0.2.5" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0c3acc6aa564495a0f2e1d59fab677cd7f81a19994cfc7f3ad0e64301560389" +checksum = "21d30fdbb5dc2d8f91049691aa1a9d4d4ae422a21c334ce8936e5886d30c5c45" dependencies = [ "proc-macro2", "quote", @@ -1507,12 +1425,12 @@ dependencies = [ [[package]] name = "tracing" -version = "0.1.21" +version = "0.1.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0987850db3733619253fe60e17cb59b82d37c7e6c0236bb81e4d6b87c879f27" +checksum = "9f47026cdc4080c07e49b37087de021820269d996f581aac150ef9e5583eefe3" dependencies = [ - "cfg-if", - "pin-project-lite", + "cfg-if 1.0.0", + "pin-project-lite 0.2.0", "tracing-core", ] @@ -1533,9 +1451,9 @@ dependencies = [ [[package]] name = "unicode-normalization" -version = "0.1.13" +version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fb19cf769fa8c6a80a162df694621ebeb4dafb606470b2b2fce0be40a98a977" +checksum = "a13e63ab62dbe32aeee58d1c5408d35c36c392bba5d9d3142287219721afe606" dependencies = [ "tinyvec", ] @@ -1565,10 +1483,11 @@ dependencies = [ [[package]] name = "url" -version = "2.1.1" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "829d4a8476c35c9bf0bbce5a3b23f4106f79728039b726d292bb93bc106787cb" +checksum = "5909f2b0817350449ed73e8bcd81c8c3c8d9a7a5d8acba4b27db277f1868976e" dependencies = [ + "form_urlencoded", "idna 0.2.0", "matches", "percent-encoding 2.1.0", @@ -1622,7 +1541,7 @@ version = "0.2.68" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1ac64ead5ea5f05873d7c12b545865ca2b8d28adfc50a49b84770a3a97265d42" dependencies = [ - "cfg-if", + "cfg-if 0.1.10", "wasm-bindgen-macro", ] @@ -1647,7 +1566,7 @@ version = "0.4.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b7866cab0aa01de1edf8b5d7936938a7e397ee50ce24119aef3e1eaa3b6171da" dependencies = [ - "cfg-if", + "cfg-if 0.1.10", "js-sys", "wasm-bindgen", "web-sys", @@ -1694,19 +1613,13 @@ dependencies = [ [[package]] name = "wepoll-sys" -version = "3.0.0" +version = "3.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "142bc2cba3fe88be1a8fcb55c727fa4cd5b0cf2d7438722792e22f26f04bc1e0" +checksum = "0fcb14dea929042224824779fbc82d9fab8d2e6d3cbc0ac404de8edf489e77ff" dependencies = [ "cc", ] -[[package]] -name = "winapi" -version = "0.2.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" - [[package]] name = "winapi" version = "0.3.9" @@ -1717,12 +1630,6 @@ dependencies = [ "winapi-x86_64-pc-windows-gnu", ] -[[package]] -name = "winapi-build" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" - [[package]] name = "winapi-i686-pc-windows-gnu" version = "0.4.0" @@ -1735,7 +1642,7 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" dependencies = [ - "winapi 0.3.9", + "winapi", ] [[package]] @@ -1745,11 +1652,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] -name = "ws2_32-sys" -version = "0.2.1" +name = "wyz" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d59cefebd0c892fa2dd6de581e937301d8552cb44489cdff035c6187cb63fa5e" -dependencies = [ - "winapi 0.2.8", - "winapi-build", -] +checksum = "85e60b0d1b5f99db2556934e21937020776a5d31520bf169e851ac44e6420214" diff --git a/Cargo.toml b/Cargo.toml index 2a26a0e..5330af3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rabbitmq-consumer" - version = "1.0.3" + version = "1.1.0" authors = ["Dario Cancelliere "] edition = "2018" @@ -12,16 +12,17 @@ lto = true [dependencies] - async-std = "^1.6" - tokio = { version = "^0.2", features = ["full"] } + async-std = "^1.7" + tokio = { version = "^0.3", features = ["full"] } futures = "^0.3" - lapin = "^1.2" + lapin = "^1.6" toml = "^0.5" serde = "^1.0" serde_derive = "^1.0" diesel = { version = "^1.4", features = ["mysql", "chrono", "r2d2"] } chrono = { version = "^0.4", features = ["serde"] } - env_logger = "^0.7" - base64 = "^0.9" + log = "^0.4" + env_logger = "^0.8" + base64 = "^0.13" clap = "^2.33" crystalsoft-utils = "^0.1" diff --git a/src/client/consumer/channel.rs b/src/client/consumer/channel.rs index 1faed96..1384e5a 100644 --- a/src/client/consumer/channel.rs +++ b/src/client/consumer/channel.rs @@ -4,7 +4,6 @@ use lapin::options::{BasicQosOptions, QueueDeclareOptions}; use lapin::{types::FieldTable, Channel as LapinChannel, Connection, Error as LapinError, Queue}; use crate::config::queue::config::QueueConfig; -use crate::logger; #[derive(Debug)] pub enum ChannelError { @@ -33,11 +32,11 @@ impl Channel { .await .map_err(ChannelError::LapinError)?; - logger::log(format!( + info!( "[{}] Created channel with id: {}", queue.queue_name, channel.id() - )); + ); let queue = channel .queue_declare( diff --git a/src/client/consumer/connection.rs b/src/client/consumer/connection.rs index 1540511..8e53542 100644 --- a/src/client/consumer/connection.rs +++ b/src/client/consumer/connection.rs @@ -6,7 +6,6 @@ use lapin::{ }; use crate::config::RabbitConfig; -use crate::logger; #[derive(Debug, Clone)] pub enum ConnectionError { @@ -35,10 +34,10 @@ impl Connection { } if self.lapin.is_err() { - logger::log(&format!( + info!( "Connecting to RabbitMQ at {}:{}...", self.config.host, self.config.port - )); + ); match LapinConnection::connect_uri( AMQPUri { diff --git a/src/client/consumer/message.rs b/src/client/consumer/message.rs index 8744386..424504e 100644 --- a/src/client/consumer/message.rs +++ b/src/client/consumer/message.rs @@ -19,7 +19,6 @@ use base64::encode as base64_encode; use crate::client::consumer::DEFAULT_WAIT_PART; use crate::config::queue::config::QueueConfig; use crate::config::queue::{Queue, RetryMode, RetryType}; -use crate::logger; use crate::utils; #[derive(Debug)] @@ -100,10 +99,10 @@ impl Message { } }; - logger::log(&format!( + info!( "[{}] Executing command \"{}\" on consumer #{}", queue_config.queue_name, message_command.human, index - )); + ); self.process_message(index, queue_config, msg, message_command, channel, delivery) .await @@ -134,13 +133,11 @@ impl Message { match output { Ok(output) => match retry_type { RetryType::Ignored => { - logger::log( - &format!( - "[{}] Command \"{}\" executed on consumer #{} and result ignored, message removed.", - queue_config.queue_name, - message_command.human, - index - ) + info!( + "[{}] Command \"{}\" executed on consumer #{} and result ignored, message removed.", + queue_config.queue_name, + message_command.human, + index ); channel @@ -153,10 +150,10 @@ impl Message { } _ => match output.status.code().unwrap_or(NEGATIVE_ACKNOWLEDGEMENT) { ACKNOWLEDGEMENT => { - logger::log(&format!( + info!( "[{}] Command \"{}\" succeeded on consumer #{}, message removed.", queue_config.queue_name, message_command.human, index - )); + ); channel .basic_ack( @@ -174,15 +171,13 @@ impl Message { ); } NEGATIVE_ACKNOWLEDGEMENT_AND_RE_QUEUE => { - logger::log( - &format!( + info!( "[{}] Command \"{}\" failed on consumer #{}, message rejected and requeued. Output:\n{:#?}", queue_config.queue_name, message_command.human, index, output - ) - ); + ); channel .basic_reject( @@ -198,10 +193,10 @@ impl Message { .await .get_queue_wait(queue_config.id, index); - logger::log(&format!( + info!( "[{}] Waiting {} milliseconds for consumer #{}...", queue_config.queue_name, ms, index - )); + ); self.wait_db(index, queue_config).await; @@ -213,15 +208,13 @@ impl Message { ); } _ => { - logger::log( - &format!( + info!( "[{}] Command \"{}\" failed on consumer #{}, message rejected. Output:\n{:#?}", queue_config.queue_name, message_command.human, index, output - ) - ); + ); channel .basic_reject( @@ -234,14 +227,14 @@ impl Message { }, }, Err(e) => { - logger::log(&format!( + info!( "[{}] Error {:?} executing the command \"{}\" on consumer #{}, message \"{}\" rejected...", queue_config.queue_name, e, message_command.human, index, msg - )); + ); channel .basic_reject( @@ -256,15 +249,13 @@ impl Message { Ok(MessageResult::GenericOk) } CommandResult::Timeout => { - logger::log( - &format!( + info!( "[{}] Timeout occurred executing the command \"{}\" on consumer #{}, message \"{}\" rejected and requeued...", queue_config.queue_name, message_command.human, index, msg - ) - ); + ); channel .basic_reject(delivery.delivery_tag, BasicRejectOptions { requeue: true }) diff --git a/src/client/consumer/mod.rs b/src/client/consumer/mod.rs index bf3ac0b..d4f0a44 100644 --- a/src/client/consumer/mod.rs +++ b/src/client/consumer/mod.rs @@ -22,7 +22,6 @@ use crate::config::file::File; use crate::config::queue::config::QueueConfig; use crate::config::queue::Queue; use crate::config::Config; -use crate::logger; use crate::utils; const CONSUMER_WAIT: u64 = 60000; @@ -94,7 +93,7 @@ impl Consumer { futures.push(sigquit.boxed()); futures.push(sigterm.boxed()); - logger::log("Managing queues..."); + info!("Managing queues..."); let queues = self.queue.write().await.get_queues(); if queues.is_empty() { @@ -112,7 +111,7 @@ impl Consumer { .await { Ok((c, q)) => { - logger::log(format!("[{}] Queue created", queue.queue_name)); + info!("[{}] Queue created", queue.queue_name); self.consume(index, queue.clone(), c, q).boxed() } @@ -140,10 +139,10 @@ impl Consumer { let consumer_name = format!("{}_consumer_{}", queue_config.consumer_name, index); if !self.queue.write().await.is_enabled(queue_config.id) { - logger::log(format!( + info!( "[{}] Consumer #{} with \"{}\" not enabled, waiting...", queue_config.queue_name, index, consumer_name - )); + ); } self.check_consumer(&queue_config).await; @@ -161,10 +160,10 @@ impl Consumer { match consumer { Ok(mut consumer) => { - logger::log(format!( + info!( "[{}] Consumer #{} declared \"{}\"", queue_config.queue_name, index, consumer_name - )); + ); while let Some(delivery) = consumer.next().await { match delivery { @@ -193,10 +192,10 @@ impl Consumer { .await .is_err() { - logger::log(&format!( + info!( "[{}] Error canceling the consumer #{}, returning...", queue_config.queue_name, index - )); + ); } else { utils::wait(DEFAULT_WAIT_PART).await; } @@ -207,47 +206,40 @@ impl Consumer { .await .is_err() { - logger::log( - &format!( + info!( "[{}] Error recovering message for consumer #{}, message is not ackable...", queue_config.queue_name, index - ) - ); + ); return Ok(ConsumerResult::GenericOk); } - logger::log( - &format!( + info!( "[{}] Consumer #{} not active, messages recovered and consumer canceled...", queue_config.queue_name, index - ) - ); + ); return Ok(ConsumerResult::ConsumerChanged); } else if is_changed { - logger::log(&format!( + info!( "[{}] Consumers count changed, messages recovered...", queue_config.queue_name - )); + ); return Ok(ConsumerResult::CountChanged); } } Err(e) => { - logger::log(format!( - "[{}] Error getting messages.", - queue_config.queue_name - )); + info!("[{}] Error getting messages.", queue_config.queue_name); return Err(ConsumerError::LapinError(e)); } } } - logger::log("Messages has been processed."); + info!("Messages has been processed."); Ok(ConsumerResult::GenericOk) } diff --git a/src/client/mod.rs b/src/client/mod.rs index 35dcd51..324bb09 100644 --- a/src/client/mod.rs +++ b/src/client/mod.rs @@ -7,7 +7,6 @@ use std::time::Duration; use crate::client::consumer::ConsumerError; use crate::client::executor::{Executor, ExecutorResult}; use crate::config::Config; -use crate::logger; pub enum ClientResult { Ok, @@ -28,28 +27,24 @@ impl Client { pub async fn run(&mut self) -> ClientResult { loop { match self.executor.execute().await { - ExecutorResult::Restart => logger::log("Consumer count changed, restarting..."), + ExecutorResult::Restart => info!("Consumer count changed, restarting..."), ExecutorResult::Wait(error, waiting) => { - logger::log(&format!( - "Error ({:?}), waiting {} seconds...", - error, - waiting / 1000 - )); + info!("Error ({:?}), waiting {} seconds...", error, waiting / 1000); thread::sleep(Duration::from_millis(waiting)); } ExecutorResult::Exit => { - logger::log("Process finished, exiting..."); + info!("Process finished, exiting..."); break; } ExecutorResult::Killed => { - logger::log("Process killed, exiting..."); + info!("Process killed, exiting..."); break; } ExecutorResult::Error(e) => { - logger::log(&format!("Error ({:?}), exiting...", e)); + info!("Error ({:?}), exiting...", e); return ClientResult::ConsumerError(e); } diff --git a/src/config/database/mod.rs b/src/config/database/mod.rs index fb40697..b90b44f 100644 --- a/src/config/database/mod.rs +++ b/src/config/database/mod.rs @@ -8,7 +8,6 @@ use crate::config::database::schema::queues; use crate::config::queue::config::QueueConfig; use crate::config::queue::model::QueueModel; use crate::config::DatabaseConfig; -use crate::logger; pub struct Database { pub pool: Pool>, @@ -36,11 +35,11 @@ impl Database { config.db_name ); - logger::log(&format!( + info!( "Connecting to MySQL at {}:{}...", config.host, config.port.unwrap_or(Self::DEFAULT_PORT) - )); + ); let manager = ConnectionManager::::new(database_url); Pool::builder().build(manager).unwrap_or_else(|e| { diff --git a/src/config/mod.rs b/src/config/mod.rs index f876812..3e5020c 100644 --- a/src/config/mod.rs +++ b/src/config/mod.rs @@ -10,7 +10,6 @@ use std::path::Path; use serde::Deserialize; use crate::config::queue::config::QueueConfig; -use crate::logger; use crate::utils::{bool_or_string, option_i32_or_string, u16_or_string}; #[derive(Deserialize)] @@ -62,7 +61,7 @@ impl Config { match crystalsoft_utils::read_file_string(&config) { Err(why) => panic!("Couldn't read \"{}\": {:#?}", config, why), Ok(mut configuration) => { - logger::log(format!("\"{}\" loaded correctly.", config)); + info!("\"{}\" loaded correctly.", config); let variables: HashMap<_, _> = env::vars().collect(); for (key, value) in variables { diff --git a/src/lib.rs b/src/lib.rs index 9de7133..02067ca 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -3,8 +3,9 @@ extern crate serde_derive; #[macro_use] extern crate diesel; +#[macro_use] +extern crate log; pub mod client; pub mod config; -pub mod logger; mod utils; diff --git a/src/logger/mod.rs b/src/logger/mod.rs deleted file mode 100644 index a68eab4..0000000 --- a/src/logger/mod.rs +++ /dev/null @@ -1,11 +0,0 @@ -use chrono::Local; - -pub fn log>(message: S) { - if !cfg!(test) { - println!( - "{} - {}", - Local::now().format("%Y-%m-%d %H:%M:%S"), - message.as_ref() - ); - } -} diff --git a/src/main.rs b/src/main.rs index ecfa1f5..6ef0f5c 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,12 +1,30 @@ use std::error::Error; +use std::io::Write; use clap::{App, Arg}; +use log::info; + +use env_logger::Env; + +use chrono::Local; + use rabbitmq_consumer_lib::client::{Client, ClientResult}; -use rabbitmq_consumer_lib::logger; #[tokio::main] async fn main() -> Result<(), Box> { + env_logger::Builder::from_env(Env::default().default_filter_or("info")) + .format(|buf, record| { + writeln!( + buf, + "{} [{}] - {}", + Local::now().format("%Y-%m-%dT%H:%M:%S"), + record.level(), + record.args() + ) + }) + .init(); + let name = "RabbitMQ Consumer"; let description = "A configurable RabbitMQ consumer made in Rust, useful for a stable and reliable CLI commands processor."; @@ -35,13 +53,13 @@ async fn main() -> Result<(), Box> { ) .get_matches(); - logger::log(format!( + info!( "{} v{} by Dario Cancelliere", name, env!("CARGO_PKG_VERSION") - )); - logger::log(description); - logger::log(""); + ); + info!("{}", description); + info!(""); match Client::new( matches.value_of("env").unwrap(), diff --git a/src/utils.rs b/src/utils.rs index a5f7c4c..1bda8b4 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -1,6 +1,6 @@ use std::str::FromStr; -use tokio::time::{delay_for, Duration}; +use tokio::time::{sleep, Duration}; use serde::{de, Deserialize, Deserializer}; @@ -106,5 +106,5 @@ where } pub async fn wait(millis: u64) { - delay_for(Duration::from_millis(millis)).await + sleep(Duration::from_millis(millis)).await }