Fix clippy warnings, update dependencies (4) (#118)
Signed-off-by: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
This commit is contained in:
committed by
GitHub
parent
6a065de6fc
commit
9ee99cd547
750
Cargo.lock
generated
750
Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
@@ -20,7 +20,7 @@ postgres-openssl = "0.5.0"
|
||||
rand = "0.8.0"
|
||||
rayon = "1.3.0"
|
||||
string_cache = "0.8.0"
|
||||
env_logger = "0.9.0"
|
||||
env_logger = "0.10.0"
|
||||
log = "0.4.14"
|
||||
log-panics = "2.0.0"
|
||||
|
||||
@@ -37,12 +37,12 @@ features = ["cargo"]
|
||||
optional = true
|
||||
|
||||
[dependencies.pyo3]
|
||||
version = "0.17.1"
|
||||
version = "0.19.0"
|
||||
features = ["extension-module"]
|
||||
optional = true
|
||||
|
||||
[dependencies.pyo3-log]
|
||||
version = "0.7.0"
|
||||
version = "0.8.2"
|
||||
optional = true
|
||||
|
||||
[dependencies.tikv-jemallocator]
|
||||
|
||||
@@ -7,14 +7,14 @@ edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
string_cache = "0.8.0"
|
||||
serial_test = "0.9.0"
|
||||
serial_test = "2.0.0"
|
||||
openssl = "0.10.48"
|
||||
postgres = "0.19.0"
|
||||
postgres-openssl = "0.5.0"
|
||||
rand = "0.8.0"
|
||||
synapse_compress_state = { path = "../", features = ["no-progress-bars"] }
|
||||
synapse_auto_compressor = { path = "../synapse_auto_compressor/" }
|
||||
env_logger = "0.9.0"
|
||||
env_logger = "0.10.0"
|
||||
log = "0.4.14"
|
||||
|
||||
[dependencies.state-map]
|
||||
|
||||
@@ -195,7 +195,7 @@ fn collapse_state_with_database(state_group: i64) -> StateMap<Atom> {
|
||||
|
||||
while let Some(sg) = next_group {
|
||||
// get predecessor from state_group_edges
|
||||
let mut pred = client.query_raw(query_pred, &[sg]).unwrap();
|
||||
let mut pred = client.query_raw(query_pred, [sg]).unwrap();
|
||||
|
||||
// set next_group to predecessor
|
||||
next_group = match pred.next().unwrap() {
|
||||
@@ -209,7 +209,7 @@ fn collapse_state_with_database(state_group: i64) -> StateMap<Atom> {
|
||||
}
|
||||
drop(pred);
|
||||
|
||||
let mut rows = client.query_raw(query_deltas, &[sg]).unwrap();
|
||||
let mut rows = client.query_raw(query_deltas, [sg]).unwrap();
|
||||
|
||||
while let Some(row) = rows.next().unwrap() {
|
||||
// Copy the single delta from the predecessor stored in this row
|
||||
|
||||
25
src/lib.rs
25
src/lib.rs
@@ -752,22 +752,29 @@ impl Config {
|
||||
/// are compulsory (so that new() act's like parse_arguments())
|
||||
#[cfg(feature = "pyo3")]
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
#[pyfunction(
|
||||
#[pyfunction]
|
||||
#[pyo3(signature = (
|
||||
// db_url has no default
|
||||
// room_id has no default
|
||||
output_file = "None",
|
||||
min_state_group = "None",
|
||||
groups_to_compress = "None",
|
||||
min_saved_rows = "None",
|
||||
max_state_group = "None",
|
||||
level_sizes = "String::from(\"100,50,25\")",
|
||||
db_url,
|
||||
|
||||
// room_id has no default
|
||||
room_id,
|
||||
|
||||
output_file = None,
|
||||
min_state_group = None,
|
||||
groups_to_compress = None,
|
||||
min_saved_rows = None,
|
||||
max_state_group = None,
|
||||
level_sizes = String::from("100,50,25"),
|
||||
|
||||
// have this default to true as is much worse to not have it if you need it
|
||||
// than to have it and not need it
|
||||
transactions = true,
|
||||
|
||||
graphs = false,
|
||||
commit_changes = false,
|
||||
verify = true,
|
||||
)]
|
||||
))]
|
||||
fn run_compression(
|
||||
db_url: String,
|
||||
room_id: String,
|
||||
|
||||
@@ -21,9 +21,9 @@ openssl = "0.10.48"
|
||||
postgres = "0.19.0"
|
||||
postgres-openssl = "0.5.0"
|
||||
rand = "0.8.0"
|
||||
serial_test = "0.9.0"
|
||||
serial_test = "2.0.0"
|
||||
synapse_compress_state = { path = "../", features = ["no-progress-bars"], default-features = false }
|
||||
env_logger = "0.9.0"
|
||||
env_logger = "0.10.0"
|
||||
log = "0.4.14"
|
||||
log-panics = "2.0.0"
|
||||
anyhow = "1.0.42"
|
||||
@@ -38,12 +38,12 @@ features = ["cargo"]
|
||||
optional = true
|
||||
|
||||
[dependencies.pyo3]
|
||||
version = "0.17.1"
|
||||
version = "0.19.0"
|
||||
features = ["extension-module"]
|
||||
optional = true
|
||||
|
||||
[dependencies.pyo3-log]
|
||||
version = "0.7.0"
|
||||
version = "0.8.2"
|
||||
optional = true
|
||||
|
||||
[dependencies.tikv-jemallocator]
|
||||
|
||||
@@ -74,7 +74,8 @@ fn synapse_auto_compressor(_py: Python, m: &PyModule) -> PyResult<()> {
|
||||
// ensure any panics produce error messages in the log
|
||||
log_panics::init();
|
||||
|
||||
#[pyfn(m, compress_largest_rooms)]
|
||||
#[pyfn(m)]
|
||||
#[pyo3(name = "compress_largest_rooms")]
|
||||
fn compress_state_events_table(
|
||||
py: Python,
|
||||
db_url: String,
|
||||
|
||||
Reference in New Issue
Block a user