aboutsummaryrefslogtreecommitdiffstats
path: root/atuin-client
diff options
context:
space:
mode:
authorEllie Huxtable <ellie@elliehuxtable.com>2023-05-21 16:21:51 +0100
committerGitHub <noreply@github.com>2023-05-21 15:21:51 +0000
commitd2240e1163a62f96dfb1cb99c38ffa2390d53c33 (patch)
treef25616f3855d7f79df9d7d548c901796e136f557 /atuin-client
parentRestructure account commands to account subcommand (#984) (diff)
downloadatuin-d2240e1163a62f96dfb1cb99c38ffa2390d53c33.zip
Allow server configured page size (#994)
* Allow server configured page size * Backwards compat via semver checks * Correct header name
Diffstat (limited to 'atuin-client')
-rw-r--r--atuin-client/src/sync.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/atuin-client/src/sync.rs b/atuin-client/src/sync.rs
index e62a1483..abe6ce78 100644
--- a/atuin-client/src/sync.rs
+++ b/atuin-client/src/sync.rs
@@ -11,7 +11,7 @@ use crate::{
api_client,
database::Database,
encryption::{encrypt, load_encoded_key, load_key},
- settings::{Settings, HISTORY_PAGE_SIZE},
+ settings::Settings,
};
pub fn hash_str(string: &str) -> String {
@@ -72,7 +72,7 @@ async fn sync_download(
local_count = db.history_count().await?;
- if page.len() < HISTORY_PAGE_SIZE.try_into().unwrap() {
+ if page.len() < remote_status.page_size.try_into().unwrap() {
break;
}
@@ -134,7 +134,7 @@ async fn sync_upload(
let mut cursor = Utc::now();
while local_count > remote_count {
- let last = db.before(cursor, HISTORY_PAGE_SIZE).await?;
+ let last = db.before(cursor, remote_status.page_size).await?;
let mut buffer = Vec::new();
if last.is_empty() {