Update dependencies

This commit is contained in:
eraden 2022-10-31 09:28:49 +01:00
parent 846d0b5000
commit 2778ce78b9
16 changed files with 884 additions and 966 deletions

1455
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -4,19 +4,14 @@ version = "0.1.0"
edition = "2021"
[dependencies]
model = { path = "../../shared/model" }
config = { path = "../../shared/config" }
database_manager = { path = "../database_manager" }
bus = { path = "../../shared/bus" }
actix = { version = "0.13", features = [] }
actix-rt = { version = "2.7", features = [] }
thiserror = { version = "1.0.31" }
serde = { version = "1.0.137", features = ["derive"] }
tracing = { version = "0.1.6" }
pretty_env_logger = { version = "0.4", features = [] }
bus = { path = "../../shared/bus" }
config = { path = "../../shared/config" }
database_manager = { path = "../database_manager" }
fibers_rpc = { version = "0.3.4", features = [] }
model = { path = "../../shared/model" }
pretty_env_logger = { version = "0.4", features = [] }
serde = { version = "1.0.137", features = ["derive"] }
thiserror = { version = "1.0.31" }
tracing = { version = "0.1.6" }

View File

@ -4,20 +4,15 @@ version = "0.1.0"
edition = "2021"
[dependencies]
model = { path = "../../shared/model" }
config = { path = "../../shared/config" }
database_manager = { path = "../database_manager" }
bus = { path = "../../shared/bus" }
actix = { version = "0.13", features = [] }
actix-rt = { version = "2.7", features = [] }
thiserror = { version = "1.0.31" }
serde = { version = "1.0.137", features = ["derive"] }
uuid = { version = "0.8", features = ["serde"] }
bus = { path = "../../shared/bus" }
chrono = { version = "0.4", features = ["serde"] }
tracing = { version = "0.1.34" }
config = { path = "../../shared/config" }
database_manager = { path = "../database_manager" }
model = { path = "../../shared/model" }
pretty_env_logger = { version = "0.4", features = [] }
serde = { version = "1.0.137", features = ["derive"] }
thiserror = { version = "1.0.31" }
tracing = { version = "0.1.34" }
uuid = { version = "0.8", features = ["serde"] }

View File

@ -7,31 +7,22 @@ edition = "2021"
dummy = ["fake", "rand"]
[dependencies]
model = { path = "../../shared/model" }
config = { path = "../../shared/config" }
actix = { version = "0.13", features = [] }
actix-rt = { version = "2.7", features = [] }
sqlx = { version = "0.5", features = ["migrate", "runtime-actix-rustls", "all-types", "postgres"] }
sqlx-core = { version = "0.5", features = [] }
thiserror = { version = "1.0.31" }
uuid = { version = "0.8", features = ["serde"] }
chrono = { version = "0.4", features = ["serde"] }
tracing = { version = "0.1.34" }
pretty_env_logger = { version = "0.4", features = [] }
fake = { version = "2.4.3", features = ["derive", "chrono", "http", "uuid"], optional = true }
rand = { version = "0.8.5", optional = true }
itertools = { version = "0.10.3" }
serde = { version = "1.0", features = ["derive"] }
async-trait = { version = "0.1.56" }
chrono = { version = "0.4", features = ["serde"] }
config = { path = "../../shared/config" }
fake = { version = "2.4.3", features = ["derive", "chrono", "http", "uuid"], optional = true }
itertools = { version = "0.10.3" }
model = { path = "../../shared/model" }
pretty_env_logger = { version = "0.4", features = [] }
rand = { version = "0.8.5", optional = true }
serde = { version = "1.0", features = ["derive"] }
sqlx = { version = "0.6.2", features = ["migrate", "runtime-actix-rustls", "all-types", "postgres"] }
sqlx-core = { version = "0.6.2", features = [] }
thiserror = { version = "1.0.31" }
tracing = { version = "0.1.34" }
uuid = { version = "1.2.1", features = ["serde"] }
[dev-dependencies]
testx = { path = "../../shared/testx" }

View File

@ -4,23 +4,16 @@ version = "0.1.0"
edition = "2021"
[dependencies]
model = { path = "../../shared/model" }
config = { path = "../../shared/config" }
actix = { version = "0.13", features = [] }
actix-rt = { version = "2.7", features = [] }
sendgrid = { version = "0.17", features = ["async"] }
thiserror = { version = "1.0.31" }
uuid = { version = "0.8", features = ["serde"] }
chrono = { version = "0.4", features = ["serde"] }
tracing = { version = "0.1.34" }
config = { path = "../../shared/config" }
model = { path = "../../shared/model" }
pretty_env_logger = { version = "0.4", features = [] }
tinytemplate = { version = "1.2.1" }
sendgrid = { version = "0.17", features = ["async"] }
serde = { version = "1.0", features = ["derive"] }
serde_json = { version = "1.0", features = [] }
thiserror = { version = "1.0.31" }
tinytemplate = { version = "1.2.1" }
tracing = { version = "0.1.34" }
uuid = { version = "0.8", features = ["serde"] }

View File

@ -4,25 +4,17 @@ version = "0.1.0"
edition = "2021"
[dependencies]
model = { path = "../../shared/model" }
config = { path = "../../shared/config" }
bytes = { version = "1.1.0" }
actix = { version = "0.13", features = [] }
actix-web = { version = "4.0.1" }
actix-rt = { version = "2.7", features = [] }
thiserror = { version = "1.0.31" }
serde = { version = "1.0", features = ["derive"] }
uuid = { version = "0.8", features = ["serde"] }
actix-web = { version = "4.0.1" }
bytes = { version = "1.1.0" }
chrono = { version = "0.4", features = ["serde"] }
tracing = { version = "0.1.34" }
pretty_env_logger = { version = "0.4", features = [] }
tokio = { version = "1.18.1", features = ["full"] }
config = { path = "../../shared/config" }
fibers_rpc = { version = "0.3.4", features = [] }
model = { path = "../../shared/model" }
pretty_env_logger = { version = "0.4", features = [] }
serde = { version = "1.0", features = ["derive"] }
thiserror = { version = "1.0.31" }
tokio = { version = "1.18.1", features = ["full"] }
tracing = { version = "0.1.34" }
uuid = { version = "1.2.1", features = ["serde"] }

View File

@ -4,16 +4,12 @@ version = "0.1.0"
edition = "2021"
[dependencies]
model = { path = "../../shared/model" }
config = { path = "../../shared/config" }
actix = { version = "0.13", features = [] }
actix-rt = { version = "2.7", features = [] }
thiserror = { version = "1.0.31" }
tracing = { version = "0.1.34" }
pretty_env_logger = { version = "0.4", features = [] }
config = { path = "../../shared/config" }
fluent = { version = "0.16.0" }
model = { path = "../../shared/model" }
pretty_env_logger = { version = "0.4", features = [] }
thiserror = { version = "1.0.31" }
tracing = { version = "0.1.34" }
unic-langid = { version = "0.9.0" }

View File

@ -4,19 +4,14 @@ version = "0.1.0"
edition = "2021"
[dependencies]
model = { path = "../../shared/model" }
config = { path = "../../shared/config" }
database_manager = { path = "../database_manager" }
actix = { version = "0.13", features = [] }
actix-rt = { version = "2.7", features = [] }
thiserror = { version = "1.0.31" }
serde = { version = "1.0.137", features = ["derive"] }
uuid = { version = "0.8", features = ["serde"] }
chrono = { version = "0.4", features = ["serde"] }
tracing = { version = "0.1.34" }
config = { path = "../../shared/config" }
database_manager = { path = "../database_manager" }
model = { path = "../../shared/model" }
pretty_env_logger = { version = "0.4", features = [] }
serde = { version = "1.0.137", features = ["derive"] }
thiserror = { version = "1.0.31" }
tracing = { version = "0.1.34" }
uuid = { version = "1.2.1", features = ["serde"] }

View File

@ -4,27 +4,20 @@ version = "0.1.0"
edition = "2021"
[dependencies]
model = { path = "../../shared/model" }
config = { path = "../../shared/config" }
database_manager = { path = "../database_manager" }
actix = { version = "0.13", features = [] }
actix-rt = { version = "2.7", features = [] }
thiserror = { version = "1.0.31" }
uuid = { version = "0.8", features = ["serde"] }
chrono = { version = "0.4", features = ["serde"] }
tracing = { version = "0.1.34" }
pretty_env_logger = { version = "0.4", features = [] }
config = { path = "../../shared/config" }
database_manager = { path = "../database_manager" }
derive_more = { version = "0.99", features = [] }
model = { path = "../../shared/model" }
parking_lot = { version = "0.12", features = [] }
serde = { version = "1.0", features = ["derive"] }
pay_u = { version = '0.1', features = ["single-client"] }
pretty_env_logger = { version = "0.4", features = [] }
serde = { version = "1.0", features = ["derive"] }
thiserror = { version = "1.0.31" }
tracing = { version = "0.1.34" }
uuid = { version = "0.8", features = ["serde"] }
[dev-dependencies]
testx = { path = "../../shared/testx" }

View File

@ -4,23 +4,16 @@ version = "0.1.0"
edition = "2021"
[dependencies]
model = { path = "../../shared/model" }
config = { path = "../../shared/config" }
actix = { version = "0.13", features = [] }
actix-rt = { version = "2.7", features = [] }
thiserror = { version = "1.0.31" }
uuid = { version = "0.8", features = ["serde"] }
chrono = { version = "0.4", features = ["serde"] }
tracing = { version = "0.1.34" }
pretty_env_logger = { version = "0.4", features = [] }
config = { path = "../../shared/config" }
derive_more = { version = "0.99", features = [] }
model = { path = "../../shared/model" }
parking_lot = { version = "0.12", features = [] }
pretty_env_logger = { version = "0.4", features = [] }
serde = { version = "1.0", features = ["derive"] }
sonic-channel = { version = "0.6.0", features = ["ingest"] }
sonic-channel = { version = "1.1.0", features = ["ingest"] }
thiserror = { version = "1.0.31" }
tracing = { version = "0.1.34" }
uuid = { version = "1.2.1", features = ["serde"] }

View File

@ -1,7 +1,7 @@
use std::sync::{Arc, Mutex};
use config::SharedAppConfig;
use sonic_channel::SonicChannel;
use sonic_channel::{Dest, ObjDest, PushRequest, QueryRequest, SonicChannel};
#[macro_export]
macro_rules! search_async_handler {
@ -58,7 +58,7 @@ impl SearchManager {
l.search().sonic_search_addr(),
l.search().sonic_search_pass(),
)
.expect("Failed to connect to sonic search channel"),
.unwrap_or_else(|e| panic!("Failed to connect to sonic search channel. {}", e)),
))
};
let ingest = {
@ -68,7 +68,7 @@ impl SearchManager {
l.search().sonic_ingest_addr(),
l.search().sonic_ingest_pass(),
)
.expect("Failed to connect to sonic ingest channel"),
.unwrap_or_else(|e| panic!("Failed to connect to sonic ingest channel. {}", e)),
))
};
Some(Channels { search, ingest })
@ -99,7 +99,10 @@ pub(crate) async fn search(
_config: SharedAppConfig,
) -> Result<Option<Vec<String>>> {
if let Ok(l) = channels.search.lock() {
match l.query(&msg.collection, &msg.lang, &msg.query) {
match l.query(QueryRequest::new(
Dest::col_buc(msg.collection, msg.lang),
&msg.query,
)) {
Ok(res) => Ok(Some(res)),
Err(e) => {
tracing::error!("{e:?}");
@ -128,7 +131,10 @@ pub(crate) async fn create_index(
_config: SharedAppConfig,
) -> Result<Option<()>> {
if let Ok(l) = channels.ingest.lock() {
match l.push(&msg.collection, &msg.lang, &msg.key, &msg.value) {
match l.push(PushRequest::new(
ObjDest::new(Dest::col_buc(msg.collection, msg.lang), &msg.key),
&msg.value,
)) {
Ok(_) => Ok(Some(())),
Err(e) => {
tracing::error!("{e:?}");

View File

@ -4,37 +4,28 @@ version = "0.1.0"
edition = "2021"
[dependencies]
model = { path = "../../shared/model" }
config = { path = "../../shared/config" }
database_manager = { path = "../database_manager" }
actix = { version = "0.13", features = [] }
actix-rt = { version = "2.7", features = [] }
thiserror = { version = "1.0.31" }
uuid = { version = "0.8", features = ["serde"] }
chrono = { version = "0.4", features = ["serde"] }
tracing = { version = "0.1.34" }
pretty_env_logger = { version = "0.4", features = [] }
derive_more = { version = "0.99", features = [] }
parking_lot = { version = "0.12", features = [] }
serde = { version = "1.0", features = ["derive"] }
password-hash = { version = "0.4", features = ["alloc"] }
argon2 = { version = "0.4", features = ["parallel", "password-hash"] }
rand_core = { version = "0.6", features = ["std"] }
jwt = { version = "0.16", features = [] }
hmac = { version = "0.12", features = [] }
sha2 = { version = "0.10", features = [] }
tokio = { version = "1.17", features = ["full"] }
chrono = { version = "0.4", features = ["serde"] }
config = { path = "../../shared/config" }
database_manager = { path = "../database_manager" }
derive_more = { version = "0.99", features = [] }
futures = { version = "0.3", features = [] }
futures-util = { version = "0.3", features = [] }
hmac = { version = "0.12", features = [] }
jwt = { version = "0.16", features = [] }
model = { path = "../../shared/model" }
parking_lot = { version = "0.12", features = [] }
password-hash = { version = "0.4", features = ["alloc"] }
pretty_env_logger = { version = "0.4", features = [] }
rand_core = { version = "0.6", features = ["std"] }
serde = { version = "1.0", features = ["derive"] }
sha2 = { version = "0.10", features = [] }
thiserror = { version = "1.0.31" }
tokio = { version = "1.17", features = ["full"] }
tracing = { version = "0.1.34" }
uuid = { version = "1.2.1", features = ["serde"] }
[dev-dependencies]
testx = { path = "../../shared/testx" }

View File

@ -15,11 +15,8 @@ search_manager = { path = "../actors/search_manager" }
token_manager = { path = "../actors/token_manager" }
fs_manager = { path = "../actors/fs_manager" }
account_manager = { path = "../actors/account_manager" }
human-panic = { version = "1.0.3" }
bytes = { version = "1.1.0" }
actix = { version = "0.13", features = [] }
actix-rt = { version = "2.7", features = [] }
actix-web = { version = "4.0", features = [] }
@ -32,44 +29,29 @@ actix-session = { version = "0.6", features = ["actix-redis", "redis-actor-sessi
actix-redis = { version = "0.11", features = [] }
actix-files = { version = "0.6", features = [] }
actix-multipart = { version = "0.4", features = [] }
gumdrop = { version = "0.8", features = [] }
tera = { version = "1.15", features = [] }
uuid = { version = "0.8", features = ["serde"] }
uuid = { version = "1.2.1", features = ["serde"] }
chrono = { version = "0.4", features = ["serde"] }
serde = { version = "1.0", features = ["derive"] }
serde_json = { version = "1.0", features = [] }
toml = { version = "0.5", features = [] }
sqlx = { version = "0.5", features = ["migrate", "runtime-actix-rustls", "all-types", "postgres"] }
sqlx-core = { version = "0.5", features = [] }
sqlx = { version = "0.6.2", features = ["migrate", "runtime-actix-rustls", "all-types", "postgres"] }
sqlx-core = { version = "0.6.2", features = [] }
thiserror = { version = "1.0", features = [] }
validator = { version = "0.14", features = [] }
tracing = { version = "0.1.34" }
tracing-subscriber = { version = "0.3.11" }
pretty_env_logger = { version = "0.4", features = [] }
dotenv = { version = "0.15", features = [] }
derive_more = { version = "0.99", features = [] }
parking_lot = { version = "0.12", features = [] }
tokio = { version = "1.17", features = ["full"] }
futures = { version = "0.3", features = [] }
futures-util = { version = "0.3", features = [] }
oauth2 = { version = "4.1", features = [] }
async-trait = { version = "0.1", features = [] }
jemallocator = { version = "0.3", features = [] }
include_dir = { version = "0.7.2", features = [] }
# For rewrite into bus-based app

69
config/sonic.toml Normal file
View File

@ -0,0 +1,69 @@
# Sonic
# Fast, lightweight and schema-less search backend
# Configuration file
# Example: https://github.com/valeriansaliou/sonic/blob/master/config.cfg
[server]
log_level = "debug"
[channel]
inet = "[::1]:1491"
tcp_timeout = 300
auth_password = "SecretPassword"
[channel.search]
query_limit_default = 10
query_limit_maximum = 100
query_alternates_try = 4
suggest_limit_default = 5
suggest_limit_maximum = 20
list_limit_default = 100
list_limit_maximum = 500
[store]
[store.kv]
path = "./data/store/kv/"
retain_word_objects = 1000
[store.kv.pool]
inactive_after = 1800
[store.kv.database]
flush_after = 900
compress = true
parallelism = 2
max_files = 100
max_compactions = 1
max_flushes = 1
write_buffer = 16384
write_ahead_log = true
[store.fst]
path = "./data/store/fst/"
[store.fst.pool]
inactive_after = 300
[store.fst.graph]
consolidate_after = 180
max_size = 2048
max_words = 250000

View File

@ -8,25 +8,17 @@ db = ["sqlx", "sqlx-core"]
dummy = ["fake", "rand"]
[dependencies]
serde = { version = "1.0.137" }
sqlx = { version = "0.5", features = ["migrate", "runtime-actix-rustls", "all-types", "postgres"], optional = true }
sqlx-core = { version = "0.5", features = [], optional = true }
uuid = { version = "0.8", features = ["serde"] }
chrono = { version = "0.4", features = ["serde"] }
derive_more = { version = "0.99.17" }
thiserror = { version = "1.0.31" }
validator = { version = "0.15.0" }
fake = { version = "2.4.3", features = ["derive", "chrono", "http", "uuid", "dummy"], optional = true }
rand = { version = "0.8.5", optional = true }
password-hash = { version = "0.4", features = ["alloc"] }
argon2 = { version = "0.4", features = ["parallel", "password-hash"] }
chrono = { version = "0.4", features = ["serde"] }
derive_more = { version = "0.99.17" }
fake = { version = "2", features = ["derive", "chrono", "http", "uuid", "dummy"], optional = true }
password-hash = { version = "0.4", features = ["alloc"] }
rand = { version = "0.8.5", optional = true }
rand_core = { version = "0.6", features = ["std"] }
serde = { version = "1.0.137" }
sqlx = { version = "0.6.2", features = ["migrate", "runtime-actix-rustls", "all-types", "postgres"], optional = true }
sqlx-core = { version = "0.6.2", features = [], optional = true }
thiserror = { version = "1.0.31" }
tracing = { version = "0.1.34" }
uuid = { version = "1.2.1", features = ["serde"] }
validator = { version = "0.15.0" }

View File

@ -8,26 +8,16 @@ crate-type = ["cdylib"]
[dependencies]
model = { path = "../shared/model", features = ["dummy"] }
seed = { version = "0.9.1", features = [] }
#seed_heroicons = { git = "https://github.com/mh84/seed_heroicons.git" }
chrono = { version = "*", features = ["wasm-bindgen", "wasmbind"] }
gloo-timers = { version = "*", features = ["futures"] }
uuid = { version = "1.0.0", features = ["v4"] }
serde = { version = "1.0.137", features = ["derive"] }
serde_json = { version = "1.0.81" }
serde-wasm-bindgen = { version = "0.4.2" }
wasm-bindgen = { version = "0.2.80", features = ["default"] }
web-sys = { version = "0.3.57", features = ["Navigator"] }
js-sys = { version = "0.3.57", features = [] }
indexmap = { version = "1", default-features = false, features = ["serde-1", "std"] }
rusty-money = { version = "0.4.1", features = ["iso"] }
thiserror = { version = "1.0.31" }