versions of tokio/actix work for OBS gateway

This commit is contained in:
Brandon Thomas committed 2021-11-08 00:57:02 -05:00
1 parent a727e261d1
commit 06a327367c
3 files changed
+424 -124

No files matched your search

Generated
+384 -67
View File
@@ -9,7 +9,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1be241f88f3b1e7e9a3fbe3b5a8a0f6915b5a1d7ee0d9a248d3376d01068cc60"
dependencies = [
"actix-rt 1.1.1",
"actix_derive",
"actix_derive 0.5.0",
"bitflags",
"bytes 0.5.6",
"crossbeam-channel 0.4.4",
@@ -27,6 +27,30 @@ dependencies = [
"trust-dns-resolver",
]
[[package]]
name = "actix"
version = "0.12.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3720d0064a0ce5c0de7bd93bdb0a6caebab2a9b5668746145d7b3b0c5da02914"
dependencies = [
"actix-rt 2.4.0",
"actix_derive 0.6.0",
"bitflags",
"bytes 1.0.1",
"crossbeam-channel 0.5.1",
"futures-core",
"futures-sink",
"futures-task",
"futures-util",
"log",
"once_cell",
"parking_lot 0.11.1",
"pin-project-lite 0.2.6",
"smallvec 1.6.1",
"tokio 1.6.0",
"tokio-util 0.6.9",
]
[[package]]
name = "actix-codec"
version = "0.3.0"
@@ -43,15 +67,32 @@ dependencies = [
"tokio-util 0.3.1",
]
[[package]]
name = "actix-codec"
version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "13895df506faee81e423febbae3a33b27fca71831b96bb3d60adf16ebcfea952"
dependencies = [
"bitflags",
"bytes 1.0.1",
"futures-core",
"futures-sink",
"log",
"memchr",
"pin-project-lite 0.2.6",
"tokio 1.6.0",
"tokio-util 0.6.9",
]
[[package]]
name = "actix-connect"
version = "2.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "177837a10863f15ba8d3ae3ec12fac1099099529ed20083a27fdfe247381d0dc"
dependencies = [
"actix-codec",
"actix-codec 0.3.0",
"actix-rt 1.1.1",
"actix-service",
"actix-service 1.0.6",
"actix-utils 2.0.0",
"derive_more",
"either",
@@ -68,7 +109,7 @@ version = "0.5.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "36b133d8026a9f209a9aeeeacd028e7451bcca975f592881b305d37983f303d7"
dependencies = [
"actix-web",
"actix-web 3.3.2",
"derive_more",
"futures-util",
"log",
@@ -82,8 +123,8 @@ version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c51e8a9146c12fce92a6e4c24b8c4d9b05268130bfd8d61bc587e822c32ce689"
dependencies = [
"actix-service",
"actix-web",
"actix-service 1.0.6",
"actix-web 3.3.2",
"bitflags",
"bytes 0.5.6",
"derive_more",
@@ -102,17 +143,17 @@ version = "2.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "452299e87817ae5673910e53c243484ca38be3828db819b6011736fc6982e874"
dependencies = [
"actix-codec",
"actix-codec 0.3.0",
"actix-connect",
"actix-rt 1.1.1",
"actix-service",
"actix-service 1.0.6",
"actix-threadpool",
"actix-utils 2.0.0",
"base64 0.13.0",
"bitflags",
"brotli2",
"bytes 0.5.6",
"cookie",
"cookie 0.14.4",
"copyless",
"derive_more",
"either",
@@ -127,7 +168,7 @@ dependencies = [
"httparse",
"indexmap",
"itoa",
"language-tags",
"language-tags 0.2.2",
"lazy_static",
"log",
"mime",
@@ -143,6 +184,48 @@ dependencies = [
"time 0.2.26",
]
[[package]]
name = "actix-http"
version = "3.0.0-beta.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c9b510d35f13987537289f38bf136e7e702a5c87cc28760310cc459544f40afd"
dependencies = [
"actix-codec 0.4.1",
"actix-rt 2.4.0",
"actix-service 2.0.1",
"actix-tls 3.0.0-beta.7",
"actix-utils 3.0.0",
"ahash 0.7.4",
"base64 0.13.0",
"bitflags",
"brotli2",
"bytes 1.0.1",
"bytestring",
"derive_more",
"encoding_rs",
"flate2",
"futures-core",
"futures-util",
"h2 0.3.7",
"http",
"httparse",
"httpdate 1.0.1",
"itoa",
"language-tags 0.3.2",
"local-channel",
"log",
"mime",
"once_cell",
"percent-encoding 2.1.0",
"pin-project 1.0.7",
"pin-project-lite 0.2.6",
"rand 0.8.4",
"sha-1",
"smallvec 1.6.1",
"tokio 1.6.0",
"zstd",
]
[[package]]
name = "actix-macros"
version = "0.1.3"
@@ -155,9 +238,9 @@ dependencies = [
[[package]]
name = "actix-macros"
version = "0.2.1"
version = "0.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c2f86cd6857c135e6e9fe57b1619a88d1f94a7df34c00e11fe13e64fd3438837"
checksum = "465a6172cf69b960917811022d8f29bc0b7fa1398bc4f78b3c466673db1213b6"
dependencies = [
"quote",
"syn",
@@ -169,9 +252,9 @@ version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "774bfeb11b54bf9c857a005b8ab893293da4eaff79261a66a9200dab7f5ab6e3"
dependencies = [
"actix-service",
"actix-service 1.0.6",
"actix-utils 2.0.0",
"actix-web",
"actix-web 3.3.2",
"bytes 0.5.6",
"derive_more",
"futures-util",
@@ -194,6 +277,20 @@ dependencies = [
"serde",
]
[[package]]
name = "actix-router"
version = "0.5.0-beta.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "36b95ce0d76d1aa2f98b681702807475ade0f99bd4552546a6843a966d42ea3d"
dependencies = [
"bytestring",
"firestorm",
"http",
"log",
"regex",
"serde",
]
[[package]]
name = "actix-rt"
version = "1.1.1"
@@ -211,11 +308,11 @@ dependencies = [
[[package]]
name = "actix-rt"
version = "2.2.0"
version = "2.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bc7d7cd957c9ed92288a7c3c96af81fa5291f65247a76a34dac7b6af74e52ba0"
checksum = "4a0c218d0a17c120f10ee0c69c9f0c45d87319e8f66b1f065e8412b612fc3e24"
dependencies = [
"actix-macros 0.2.1",
"actix-macros 0.2.3",
"futures-core",
"tokio 1.6.0",
]
@@ -226,9 +323,9 @@ version = "1.0.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "45407e6e672ca24784baa667c5d32ef109ccdd8d5e0b5ebb9ef8a67f4dfb708e"
dependencies = [
"actix-codec",
"actix-codec 0.3.0",
"actix-rt 1.1.1",
"actix-service",
"actix-service 1.0.6",
"actix-utils 2.0.0",
"futures-channel",
"futures-util",
@@ -240,6 +337,22 @@ dependencies = [
"socket2 0.3.19",
]
[[package]]
name = "actix-server"
version = "2.0.0-beta.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7367665785765b066ad16e1086d26a087f696bc7c42b6f93004ced6cfcf1eeca"
dependencies = [
"actix-rt 2.4.0",
"actix-service 2.0.1",
"actix-utils 3.0.0",
"futures-core",
"log",
"mio 0.7.11",
"num_cpus",
"tokio 1.6.0",
]
[[package]]
name = "actix-service"
version = "1.0.6"
@@ -250,6 +363,17 @@ dependencies = [
"pin-project 0.4.28",
]
[[package]]
name = "actix-service"
version = "2.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8d3dc6a618b082974a08d7a4781d24d4691cba51500059bfebe6656a61ebfe1e"
dependencies = [
"futures-core",
"paste",
"pin-project-lite 0.2.6",
]
[[package]]
name = "actix-testing"
version = "1.0.1"
@@ -258,8 +382,8 @@ checksum = "47239ca38799ab74ee6a8a94d1ce857014b2ac36f242f70f3f75a66f691e791c"
dependencies = [
"actix-macros 0.1.3",
"actix-rt 1.1.1",
"actix-server",
"actix-service",
"actix-server 1.0.4",
"actix-service 1.0.6",
"log",
"socket2 0.3.19",
]
@@ -285,21 +409,38 @@ version = "2.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "24789b7d7361cf5503a504ebe1c10806896f61e96eca9a7350e23001aca715fb"
dependencies = [
"actix-codec",
"actix-service",
"actix-codec 0.3.0",
"actix-service 1.0.6",
"actix-utils 2.0.0",
"futures-util",
]
[[package]]
name = "actix-tls"
version = "3.0.0-beta.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e4af84e13e4600829858a3e68079be710d1ada461431e1e4c5ae663479ea0a3c"
dependencies = [
"actix-codec 0.4.1",
"actix-rt 2.4.0",
"actix-service 2.0.1",
"actix-utils 3.0.0",
"derive_more",
"futures-core",
"http",
"log",
"tokio-util 0.6.9",
]
[[package]]
name = "actix-utils"
version = "2.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2e9022dec56632d1d7979e59af14f0597a28a830a9c1c7fec8b2327eb9f16b5a"
dependencies = [
"actix-codec",
"actix-codec 0.3.0",
"actix-rt 1.1.1",
"actix-service",
"actix-service 1.0.6",
"bitflags",
"bytes 0.5.6",
"either",
@@ -327,18 +468,18 @@ version = "3.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e641d4a172e7faa0862241a20ff4f1f5ab0ab7c279f00c2d4587b77483477b86"
dependencies = [
"actix-codec",
"actix-http",
"actix-codec 0.3.0",
"actix-http 2.2.0",
"actix-macros 0.1.3",
"actix-router",
"actix-router 0.2.7",
"actix-rt 1.1.1",
"actix-server",
"actix-service",
"actix-server 1.0.4",
"actix-service 1.0.6",
"actix-testing",
"actix-threadpool",
"actix-tls",
"actix-tls 2.0.0",
"actix-utils 2.0.0",
"actix-web-codegen",
"actix-web-codegen 0.4.0",
"awc",
"bytes 0.5.6",
"derive_more",
@@ -360,22 +501,80 @@ dependencies = [
"url 2.2.2",
]
[[package]]
name = "actix-web"
version = "4.0.0-beta.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e8a4b9d00991d8da308070a5cea7f1bbaa153a91c3fb5567937d99b9f46d601e"
dependencies = [
"actix-codec 0.4.1",
"actix-http 3.0.0-beta.11",
"actix-macros 0.2.3",
"actix-router 0.5.0-beta.2",
"actix-rt 2.4.0",
"actix-server 2.0.0-beta.6",
"actix-service 2.0.1",
"actix-utils 3.0.0",
"actix-web-codegen 0.5.0-beta.5",
"ahash 0.7.4",
"bytes 1.0.1",
"cfg-if 1.0.0",
"cookie 0.15.1",
"derive_more",
"either",
"encoding_rs",
"futures-core",
"futures-util",
"itoa",
"language-tags 0.3.2",
"log",
"mime",
"once_cell",
"paste",
"pin-project 1.0.7",
"regex",
"serde",
"serde_json",
"serde_urlencoded",
"smallvec 1.6.1",
"socket2 0.4.0",
"time 0.3.4",
"url 2.2.2",
]
[[package]]
name = "actix-web-actors"
version = "3.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7f6edf3c2693e2a8c422800c87ee89a6a4eac7dd01109bc172a1093ce1f4f001"
dependencies = [
"actix",
"actix-codec",
"actix-http",
"actix-web",
"actix 0.10.0",
"actix-codec 0.3.0",
"actix-http 2.2.0",
"actix-web 3.3.2",
"bytes 0.5.6",
"futures-channel",
"futures-core",
"pin-project 0.4.28",
]
[[package]]
name = "actix-web-actors"
version = "4.0.0-beta.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "00b43c8e03f1877bc010316de455ee479aa0de0ae0717d49041db5f38fa192de"
dependencies = [
"actix 0.12.0",
"actix-codec 0.4.1",
"actix-http 3.0.0-beta.11",
"actix-web 4.0.0-beta.10",
"bytes 1.0.1",
"bytestring",
"futures-core",
"pin-project 1.0.7",
"tokio 1.6.0",
]
[[package]]
name = "actix-web-codegen"
version = "0.4.0"
@@ -387,6 +586,18 @@ dependencies = [
"syn",
]
[[package]]
name = "actix-web-codegen"
version = "0.5.0-beta.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dfe80a8828fa88a0420dc8fdd4c16b8207326c917f17701881b063eadc2a8d3b"
dependencies = [
"actix-router 0.5.0-beta.2",
"proc-macro2",
"quote",
"syn",
]
[[package]]
name = "actix_derive"
version = "0.5.0"
@@ -398,6 +609,17 @@ dependencies = [
"syn",
]
[[package]]
name = "actix_derive"
version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6d44b8fee1ced9671ba043476deddef739dd0959bf77030b26b738cc591737a7"
dependencies = [
"proc-macro2",
"quote",
"syn",
]
[[package]]
name = "adler"
version = "1.0.2"
@@ -437,6 +659,17 @@ dependencies = [
"version_check 0.9.3",
]
[[package]]
name = "ahash"
version = "0.7.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "43bb833f0bf979d8475d38fbf09ed3b8a55e1885fe93ad3f93239fc6a4f17b98"
dependencies = [
"getrandom 0.2.2",
"once_cell",
"version_check 0.9.3",
]
[[package]]
name = "aho-corasick"
version = "0.7.18"
@@ -666,10 +899,10 @@ version = "2.0.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b381e490e7b0cfc37ebc54079b0413d8093ef43d14a4e4747083f7fa47a9e691"
dependencies = [
"actix-codec",
"actix-http",
"actix-codec 0.3.0",
"actix-http 2.2.0",
"actix-rt 1.1.1",
"actix-service",
"actix-service 1.0.6",
"base64 0.13.0",
"bytes 0.5.6",
"cfg-if 1.0.0",
@@ -928,6 +1161,9 @@ name = "cc"
version = "1.0.67"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e3c69b077ad434294d3ce9f1f6143a2a4b89a8a2d54ef813d85003a4fd1137fd"
dependencies = [
"jobserver",
]
[[package]]
name = "cfb"
@@ -1049,6 +1285,17 @@ dependencies = [
"version_check 0.9.3",
]
[[package]]
name = "cookie"
version = "0.15.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d5f1c7727e460397e56abc4bddc1d49e07a1ad78fc98eb2e1c8f032a58a2f80d"
dependencies = [
"percent-encoding 2.1.0",
"time 0.2.26",
"version_check 0.9.3",
]
[[package]]
name = "copyless"
version = "0.1.5"
@@ -1383,6 +1630,12 @@ dependencies = [
"instant",
]
[[package]]
name = "firestorm"
version = "0.4.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "31586bda1b136406162e381a3185a506cdfc1631708dd40cba2f6628d8634499"
[[package]]
name = "flate2"
version = "1.0.20"
@@ -1791,16 +2044,16 @@ dependencies = [
name = "http_server_common"
version = "0.0.1"
dependencies = [
"actix",
"actix 0.10.0",
"actix-cors",
"actix-files",
"actix-http",
"actix-http 2.2.0",
"actix-multipart",
"actix-rt 2.2.0",
"actix-service",
"actix-rt 2.4.0",
"actix-service 1.0.6",
"actix-utils 3.0.0",
"actix-web",
"actix-web-actors",
"actix-web 3.3.2",
"actix-web-actors 3.0.0",
"anyhow",
"base64 0.13.0",
"bcrypt",
@@ -2026,6 +2279,15 @@ version = "0.4.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dd25036021b0de88a0aff6b850051563c6516d0bf53f8638938edbb9de732736"
[[package]]
name = "jobserver"
version = "0.1.24"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "af25a77299a7f711a01975c35a6a424eb6862092cc2d6c72c4ed6cbc56dfc1fa"
dependencies = [
"libc",
]
[[package]]
name = "js-sys"
version = "0.3.51"
@@ -2075,6 +2337,12 @@ version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a91d884b6667cd606bb5a69aa0c99ba811a115fc68915e7056ec08a46e93199a"
[[package]]
name = "language-tags"
version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d4345964bb142484797b161f473a503a434de77149dd8c7427788c6e13379388"
[[package]]
name = "lazy_static"
version = "1.4.0"
@@ -2108,9 +2376,9 @@ dependencies = [
[[package]]
name = "libc"
version = "0.2.94"
version = "0.2.107"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "18794a8ad5b29321f790b55d93dfba91e125cb1a9edbd4f8e3150acc771c1a5e"
checksum = "fbe5e23404da5b4f555ef85ebed98fb4083e55a00c317800bc2a50ede9f3d219"
[[package]]
name = "libm"
@@ -2145,6 +2413,18 @@ dependencies = [
"linked-hash-map",
]
[[package]]
name = "local-channel"
version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6246c68cf195087205a0512559c97e15eaf95198bf0e206d662092cdcb03fe9f"
dependencies = [
"futures-core",
"futures-sink",
"futures-util",
"local-waker",
]
[[package]]
name = "local-waker"
version = "0.1.1"
@@ -2522,23 +2802,21 @@ dependencies = [
name = "obs-gateway-server"
version = "0.0.1"
dependencies = [
"actix",
"actix 0.12.0",
"actix-cors",
"actix-files",
"actix-http",
"actix-multipart",
"actix-rt 2.2.0",
"actix-service",
"actix-http 3.0.0-beta.11",
"actix-rt 2.4.0",
"actix-service 2.0.1",
"actix-utils 3.0.0",
"actix-web",
"actix-web-actors",
"actix-web 4.0.0-beta.10",
"actix-web-actors 4.0.0-beta.7",
"anyhow",
"base64 0.13.0",
"bcrypt",
"chrono",
"config",
"container_common",
"data-encoding",
"derive_more",
"diesel",
"dotenv",
@@ -2548,9 +2826,7 @@ dependencies = [
"hex",
"hmac 0.10.1",
"hostname",
"http_server_common",
"hyper 0.13.10",
"infer",
"jwt",
"lazy_static",
"lfu",
@@ -2565,15 +2841,11 @@ dependencies = [
"rand 0.8.4",
"regex",
"reqwest 0.11.6",
"ring",
"rust-s3",
"serde",
"serde_derive",
"serde_json",
"sha2",
"sqlx",
"subprocess",
"tempdir",
"time 0.2.26",
"tokio 1.6.0",
"toml",
@@ -2694,6 +2966,12 @@ dependencies = [
"winapi 0.3.9",
]
[[package]]
name = "paste"
version = "1.0.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0744126afe1a6dd7f394cb50a716dbe086cb06e255e53d8d0185d82828358fb5"
[[package]]
name = "pem"
version = "0.8.3"
@@ -3701,16 +3979,16 @@ checksum = "213701ba3370744dcd1a12960caa4843b3d68b4d1c0a5d575e0d65b2ee9d16c0"
name = "storyteller-web"
version = "0.0.1"
dependencies = [
"actix",
"actix 0.10.0",
"actix-cors",
"actix-files",
"actix-http",
"actix-http 2.2.0",
"actix-multipart",
"actix-rt 2.2.0",
"actix-service",
"actix-rt 2.4.0",
"actix-service 1.0.6",
"actix-utils 3.0.0",
"actix-web",
"actix-web-actors",
"actix-web 3.3.2",
"actix-web-actors 3.0.0",
"anyhow",
"base64 0.13.0",
"bcrypt",
@@ -3911,6 +4189,16 @@ dependencies = [
"winapi 0.3.9",
]
[[package]]
name = "time"
version = "0.3.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "99beeb0daeac2bd1e86ac2c21caddecb244b39a093594da1a661ec2060c7aedd"
dependencies = [
"itoa",
"libc",
]
[[package]]
name = "time-macros"
version = "0.1.1"
@@ -4740,3 +5028,32 @@ dependencies = [
"syn",
"synstructure",
]
[[package]]
name = "zstd"
version = "0.7.0+zstd.1.4.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9428752481d8372e15b1bf779ea518a179ad6c771cca2d2c60e4fbff3cc2cd52"
dependencies = [
"zstd-safe",
]
[[package]]
name = "zstd-safe"
version = "3.1.0+zstd.1.4.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5aa1926623ad7fe406e090555387daf73db555b948134b4d73eac5eb08fb666d"
dependencies = [
"libc",
"zstd-sys",
]
[[package]]
name = "zstd-sys"
version = "1.5.0+zstd.1.4.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4e6c094340240369025fc6b731b054ee2a834328fa584310ac96aa4baebdc465"
dependencies = [
"cc",
"libc",
]
+9 -24
View File
@@ -17,7 +17,7 @@ path = "src/main.rs"
# Internal
config = { path = "../config" }
container_common = { path = "../container_common" }
http_server_common = { path = "../http_server_common" }
#http_server_common = { path = "../http_server_common" }
# External
anyhow = "1.0.40"
@@ -47,7 +47,8 @@ uuid = { version = "0.8.2", features = ["v4"] }
# https://github.com/durch/rust-s3/issues/198
#tokio = { version = "1.6.0", features = ["macros"] }
#tokio = { version = "0.2.25", features = ["macros"] }
# NB(3,2021-11-07): Actually, maybe we can do this in a complex multi-project monorepo
# NB(3,2021-11-07): Actually, maybe we can specify a version that diverges from
# the rest of the monorepo. The Twitch client needs a 1.x runtime.
tokio = { version = "1.6.0", features = ["macros", "rt-multi-thread"] }
# MySql Database
@@ -76,32 +77,16 @@ native-tls = "0.2.8"
# In-memory caching
lru_time_cache = "0.11.11"
# Files
data-encoding = "2.3.2"
ring = "0.17.0-alpha.10"
# NB: This is the source of all of our problems. `rust-s3` can't upload to object names with directories
# in the 0.27.* series, so we have to downgrade to 0.26, which includes a broad downgrade from Tokio 1.0 -> 0.2
#rust-s3 = "0.27.0-rc4"
#rust-s3 = { version = "0.27.0-rc4", features = ["with-async-std"], default-features = false }
rust-s3 = { version = "0.26" }
infer = "0.5.0"
subprocess = "0.2.6"
tempdir = "0.3.7"
# Web
actix = "0.10"
#actix-web = "3"
actix-web-actors = "3"
actix = "0.12.0"
actix-cors = "0.5.4"
actix-files= "0.5"
actix-http = "2.2.0"
actix-multipart = "0.3.0" # TODO: Ready for 0.4 upgrade
actix-rt = "2.2.0"
actix-service = "1.0.6"
actix-http = "3.0.0-beta.11"
actix-rt = "2.4.0"
actix-service = "2.0.1"
actix-utils = "3.0.0"
actix-web = "3.3.2"
actix-web = "4.0.0-beta.10"
actix-web-actors = "4.0.0-beta.7"
jwt = "0.13.0"
# NB: Hyper is just for HTTP client use in jobs. I'd use Actix client, but I need tokio runtime
+31 -33
View File
@@ -26,9 +26,9 @@ use crate::pubsub_gateway::ws_index;
use crate::twitch::twitch_secrets::TwitchSecrets;
use futures::Future;
use futures::executor::ThreadPool;
use http_server_common::cors::build_common_cors_config;
use http_server_common::endpoints::default_route_404::default_route_404;
use http_server_common::endpoints::root_index::get_root_index;
//use http_server_common::cors::build_common_cors_config;
//use http_server_common::endpoints::default_route_404::default_route_404;
//use http_server_common::endpoints::root_index::get_root_index;
use limitation::Limiter;
use log::{info};
use r2d2_redis::RedisConnectionManager;
@@ -66,8 +66,8 @@ pub struct EnvConfig {
pub website_homepage_redirect: String,
}
//#[actix_web::main]
#[tokio::main]
#[actix_web::main]
//#[tokio::main]
async fn main() -> AnyhowResult<()> {
easyenv::init_all_with_default_logging(Some(DEFAULT_RUST_LOG));
@@ -93,6 +93,8 @@ async fn main() -> AnyhowResult<()> {
// ========================================================
// TODO: Temp comment out to debug actix-web vs. runtime
//
info!("Getting app access token...");
//let scopes = Scope::all();
@@ -130,33 +132,29 @@ async fn main() -> AnyhowResult<()> {
println!("Go to this page: {}", url);
// ========================================================
info!("Connecting to database...");
let db_connection_string =
easyenv::get_env_string_or_default(
"MYSQL_URL",
DEFAULT_MYSQL_CONNECTION_STRING);
let redis_connection_string =
easyenv::get_env_string_or_default(
"REDIS_URL",
DEFAULT_REDIS_CONNECTION_STRING);
let pool = MySqlPoolOptions::new()
.max_connections(5)
.connect(&db_connection_string)
.await?;
let redis_manager = RedisConnectionManager::new(redis_connection_string.clone())?;
let redis_pool = r2d2::Pool::builder()
.build(redis_manager)?;
// info!("Connecting to database...");
//
// let db_connection_string =
// easyenv::get_env_string_or_default(
// "MYSQL_URL",
// DEFAULT_MYSQL_CONNECTION_STRING);
//
// let redis_connection_string =
// easyenv::get_env_string_or_default(
// "REDIS_URL",
// DEFAULT_REDIS_CONNECTION_STRING);
//
// let pool = MySqlPoolOptions::new()
// .max_connections(5)
// .connect(&db_connection_string)
// .await?;
//
// let redis_manager = RedisConnectionManager::new(redis_connection_string.clone())?;
//
// let redis_pool = r2d2::Pool::builder()
// .build(redis_manager)?;
info!("Reading env vars and setting up utils...");
@@ -201,7 +199,7 @@ pub async fn serve(server_state: ObsGatewayServerState) -> AnyhowResult<()>
HttpServer::new(move || {
App::new()
.app_data(server_state_arc.clone())
.wrap(build_common_cors_config())
//.wrap(build_common_cors_config())
.wrap(Logger::new(&log_format)
.exclude("/liveness")
.exclude("/readiness"))
@@ -214,8 +212,8 @@ pub async fn serve(server_state: ObsGatewayServerState) -> AnyhowResult<()>
.route(web::get().to(ws_index))
.route(web::head().to(|| HttpResponse::Ok()))
)
.service(get_root_index)
.default_service( web::route().to(default_route_404))
//.service(get_root_index)
//.default_service( web::route().to(default_route_404))
})
.bind(bind_address)?
.workers(num_workers)