Skip to content

Commit

Permalink
Fix DatabaseConfig port JSON parsing for Redis
Browse files Browse the repository at this point in the history
  • Loading branch information
cjdsellers committed Mar 17, 2024
1 parent 0b79fc7 commit d8d4c07
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ None

### Fixes
- Fixed JSON format for log file output (was missing `timestamp` and `trader\_id`)
- Fixed `DatabaseConfig` port JSON parsing for Redis (was always falling back to the default 6379)
- Fixed `ChandeMomentumOscillator` indicator divide by zero error

---
Expand Down
2 changes: 1 addition & 1 deletion nautilus_core/common/src/redis.rs
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ pub fn get_redis_url(config: &HashMap<String, Value>) -> String {
let host = database
.get("host")
.map(|v| v.as_str().unwrap_or("127.0.0.1"));
let port = database.get("port").map(|v| v.as_str().unwrap_or("6379"));
let port = database.get("port").map(|v| v.as_u64().unwrap_or(6379));
let username = database
.get("username")
.map(|v| v.as_str().unwrap_or_default());
Expand Down

0 comments on commit d8d4c07

Please sign in to comment.