Skip to content

Commit 7208e4f

Browse files
committed
Update continual learning state and enhance HTTP client configuration
- Updated `continual-learning.json` to reflect the latest run metrics, including an increase in turns since the last run and a new processed generation ID for accurate tracking. - Enhanced the HTTP client configuration in `roadmap.rs` to include a timeout setting, improving the robustness of API requests. These changes improve the accuracy of continual learning state management and enhance the reliability of HTTP requests.
1 parent 43f8a2b commit 7208e4f

2 files changed

Lines changed: 8 additions & 3 deletions

File tree

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"version": 1,
33
"lastRunAtMs": 1780236735739,
4-
"turnsSinceLastRun": 0,
4+
"turnsSinceLastRun": 6,
55
"lastTranscriptMtimeMs": 1780236735655.7478,
6-
"lastProcessedGenerationId": "16a17677-319f-45e5-9a04-d6520e9f9ea0",
6+
"lastProcessedGenerationId": "3e79bd8b-fada-4152-a85b-97db2256ddf8",
77
"trialStartedAtMs": null
88
}

src/routes/roadmap.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,12 @@ const ROADMAP_BASE: &str = "https://roadmap.sh/api";
1010
const CACHE_TTL: Duration = Duration::from_secs(5 * 60);
1111
const STALE_TTL: Duration = Duration::from_secs(15 * 60);
1212

13-
static HTTP_CLIENT: Lazy<reqwest::Client> = Lazy::new(reqwest::Client::new);
13+
static HTTP_CLIENT: Lazy<reqwest::Client> = Lazy::new(|| {
14+
reqwest::Client::builder()
15+
.timeout(Duration::from_secs(15))
16+
.build()
17+
.expect("failed to build roadmap HTTP client")
18+
});
1419

1520
struct CacheEntry {
1621
data: Value,

0 commit comments

Comments
 (0)