Skip to content

Commit c398212

Browse files
authored
fix(session): increase default session timeout to 1 week (#30)
* fix(session): increase default session timeout to 1 week Changed the default session timeout from 1 hour (3600s) to 1 week (604800s) in both cortex-app-server config and cortex-engine state defaults. * fix(batch): silence unused variable clippy warnings
1 parent d201070 commit c398212

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

src/cortex-app-server/src/config.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ fn default_max_sessions() -> usize {
331331
}
332332

333333
fn default_session_timeout() -> u64 {
334-
3600 // 1 hour
334+
604800 // 1 week
335335
}
336336

337337
fn default_max_messages() -> usize {

src/cortex-batch/src/batch_ops.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ async fn atomic_write(path: &Path, content: &[u8]) -> std::io::Result<()> {
6565

6666
match fs::rename(&temp_path, path).await {
6767
Ok(()) => break,
68-
Err(e) if retries > 0 => {
68+
Err(_) if retries > 0 => {
6969
retries -= 1;
7070
tokio::time::sleep(tokio::time::Duration::from_millis(50)).await;
7171
continue;

src/cortex-batch/src/multi_edit.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ async fn atomic_write(path: &Path, content: &[u8]) -> std::io::Result<()> {
6565

6666
match fs::rename(&temp_path, path).await {
6767
Ok(()) => break,
68-
Err(e) if retries > 0 => {
68+
Err(_) if retries > 0 => {
6969
retries -= 1;
7070
tokio::time::sleep(tokio::time::Duration::from_millis(50)).await;
7171
continue;

src/cortex-engine/src/state/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ impl Default for StateConfig {
6969
fn default() -> Self {
7070
Self {
7171
max_sessions: 100,
72-
session_timeout: Duration::from_secs(3600),
72+
session_timeout: Duration::from_secs(604800), // 1 week
7373
turn_timeout: Duration::from_secs(300),
7474
persist: false,
7575
persist_dir: None,

0 commit comments

Comments
 (0)