Skip to content

Commit

Permalink
Merge pull request #839 from portier/feat/update
Browse files Browse the repository at this point in the history
Dependency updates
  • Loading branch information
stephank authored Jan 19, 2024
2 parents 64a2930 + c6c4238 commit 6888a0b
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 32 deletions.
54 changes: 27 additions & 27 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ version = "0.6.4"

[dependencies.redis]
optional = true
version = "0.23.0"
version = "0.24.0"
default-features = false
features = ["script", "tokio-comp"]

Expand Down
7 changes: 3 additions & 4 deletions src/agents/store/redis.rs
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ impl Handler<SaveSession> for RedisStore {
cx.reply_later(async move {
let key = Self::format_session_key(&message.session_id);
let data = serde_json::to_string(&message.data)?;
conn.set_ex(&key, data, ttl.as_secs() as usize).await?;
conn.set_ex(&key, data, ttl.as_secs()).await?;
Ok(())
});
}
Expand Down Expand Up @@ -203,7 +203,7 @@ impl Handler<SaveAuthCode> for RedisStore {
cx.reply_later(async move {
let key = Self::format_auth_code_key(&message.code);
let data = serde_json::to_string(&message.data)?;
conn.set_ex(&key, data, ttl.as_secs() as usize).await?;
conn.set_ex(&key, data, ttl.as_secs()).await?;
Ok(())
});
}
Expand Down Expand Up @@ -247,8 +247,7 @@ impl Handler<FetchUrlCached> for RedisStore {
.send(FetchUrl::get(&message.url, message.metric))
.await?;
let ttl = std::cmp::max(expire_cache, result.max_age);
conn.set_ex(key, result.data.clone(), ttl.as_secs() as usize)
.await?;
conn.set_ex(key, result.data.clone(), ttl.as_secs()).await?;
Ok(result.data)
}
});
Expand Down

0 comments on commit 6888a0b

Please sign in to comment.