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"
|
rand = "0.8.0"
|
||||||
rayon = "1.3.0"
|
rayon = "1.3.0"
|
||||||
string_cache = "0.8.0"
|
string_cache = "0.8.0"
|
||||||
env_logger = "0.9.0"
|
env_logger = "0.10.0"
|
||||||
log = "0.4.14"
|
log = "0.4.14"
|
||||||
log-panics = "2.0.0"
|
log-panics = "2.0.0"
|
||||||
|
|
||||||
@@ -37,12 +37,12 @@ features = ["cargo"]
|
|||||||
optional = true
|
optional = true
|
||||||
|
|
||||||
[dependencies.pyo3]
|
[dependencies.pyo3]
|
||||||
version = "0.17.1"
|
version = "0.19.0"
|
||||||
features = ["extension-module"]
|
features = ["extension-module"]
|
||||||
optional = true
|
optional = true
|
||||||
|
|
||||||
[dependencies.pyo3-log]
|
[dependencies.pyo3-log]
|
||||||
version = "0.7.0"
|
version = "0.8.2"
|
||||||
optional = true
|
optional = true
|
||||||
|
|
||||||
[dependencies.tikv-jemallocator]
|
[dependencies.tikv-jemallocator]
|
||||||
|
|||||||
@@ -7,14 +7,14 @@ edition = "2018"
|
|||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
string_cache = "0.8.0"
|
string_cache = "0.8.0"
|
||||||
serial_test = "0.9.0"
|
serial_test = "2.0.0"
|
||||||
openssl = "0.10.48"
|
openssl = "0.10.48"
|
||||||
postgres = "0.19.0"
|
postgres = "0.19.0"
|
||||||
postgres-openssl = "0.5.0"
|
postgres-openssl = "0.5.0"
|
||||||
rand = "0.8.0"
|
rand = "0.8.0"
|
||||||
synapse_compress_state = { path = "../", features = ["no-progress-bars"] }
|
synapse_compress_state = { path = "../", features = ["no-progress-bars"] }
|
||||||
synapse_auto_compressor = { path = "../synapse_auto_compressor/" }
|
synapse_auto_compressor = { path = "../synapse_auto_compressor/" }
|
||||||
env_logger = "0.9.0"
|
env_logger = "0.10.0"
|
||||||
log = "0.4.14"
|
log = "0.4.14"
|
||||||
|
|
||||||
[dependencies.state-map]
|
[dependencies.state-map]
|
||||||
|
|||||||
@@ -195,7 +195,7 @@ fn collapse_state_with_database(state_group: i64) -> StateMap<Atom> {
|
|||||||
|
|
||||||
while let Some(sg) = next_group {
|
while let Some(sg) = next_group {
|
||||||
// get predecessor from state_group_edges
|
// 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
|
// set next_group to predecessor
|
||||||
next_group = match pred.next().unwrap() {
|
next_group = match pred.next().unwrap() {
|
||||||
@@ -209,7 +209,7 @@ fn collapse_state_with_database(state_group: i64) -> StateMap<Atom> {
|
|||||||
}
|
}
|
||||||
drop(pred);
|
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() {
|
while let Some(row) = rows.next().unwrap() {
|
||||||
// Copy the single delta from the predecessor stored in this row
|
// Copy the single delta from the predecessor stored in this row
|
||||||
|
|||||||
23
src/lib.rs
23
src/lib.rs
@@ -752,22 +752,29 @@ impl Config {
|
|||||||
/// are compulsory (so that new() act's like parse_arguments())
|
/// are compulsory (so that new() act's like parse_arguments())
|
||||||
#[cfg(feature = "pyo3")]
|
#[cfg(feature = "pyo3")]
|
||||||
#[allow(clippy::too_many_arguments)]
|
#[allow(clippy::too_many_arguments)]
|
||||||
#[pyfunction(
|
#[pyfunction]
|
||||||
|
#[pyo3(signature = (
|
||||||
// db_url has no default
|
// db_url has no default
|
||||||
|
db_url,
|
||||||
|
|
||||||
// room_id has no default
|
// room_id has no default
|
||||||
output_file = "None",
|
room_id,
|
||||||
min_state_group = "None",
|
|
||||||
groups_to_compress = "None",
|
output_file = None,
|
||||||
min_saved_rows = "None",
|
min_state_group = None,
|
||||||
max_state_group = "None",
|
groups_to_compress = None,
|
||||||
level_sizes = "String::from(\"100,50,25\")",
|
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
|
// 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
|
// than to have it and not need it
|
||||||
transactions = true,
|
transactions = true,
|
||||||
|
|
||||||
graphs = false,
|
graphs = false,
|
||||||
commit_changes = false,
|
commit_changes = false,
|
||||||
verify = true,
|
verify = true,
|
||||||
)]
|
))]
|
||||||
fn run_compression(
|
fn run_compression(
|
||||||
db_url: String,
|
db_url: String,
|
||||||
room_id: String,
|
room_id: String,
|
||||||
|
|||||||
@@ -21,9 +21,9 @@ openssl = "0.10.48"
|
|||||||
postgres = "0.19.0"
|
postgres = "0.19.0"
|
||||||
postgres-openssl = "0.5.0"
|
postgres-openssl = "0.5.0"
|
||||||
rand = "0.8.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 }
|
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 = "0.4.14"
|
||||||
log-panics = "2.0.0"
|
log-panics = "2.0.0"
|
||||||
anyhow = "1.0.42"
|
anyhow = "1.0.42"
|
||||||
@@ -38,12 +38,12 @@ features = ["cargo"]
|
|||||||
optional = true
|
optional = true
|
||||||
|
|
||||||
[dependencies.pyo3]
|
[dependencies.pyo3]
|
||||||
version = "0.17.1"
|
version = "0.19.0"
|
||||||
features = ["extension-module"]
|
features = ["extension-module"]
|
||||||
optional = true
|
optional = true
|
||||||
|
|
||||||
[dependencies.pyo3-log]
|
[dependencies.pyo3-log]
|
||||||
version = "0.7.0"
|
version = "0.8.2"
|
||||||
optional = true
|
optional = true
|
||||||
|
|
||||||
[dependencies.tikv-jemallocator]
|
[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
|
// ensure any panics produce error messages in the log
|
||||||
log_panics::init();
|
log_panics::init();
|
||||||
|
|
||||||
#[pyfn(m, compress_largest_rooms)]
|
#[pyfn(m)]
|
||||||
|
#[pyo3(name = "compress_largest_rooms")]
|
||||||
fn compress_state_events_table(
|
fn compress_state_events_table(
|
||||||
py: Python,
|
py: Python,
|
||||||
db_url: String,
|
db_url: String,
|
||||||
|
|||||||
Reference in New Issue
Block a user