huskies: merge 500_story_remove_duplicate_pty_debug_log_lines
This commit is contained in:
+19
-16
@@ -363,20 +363,25 @@ fn run_agent_pty_blocking(
|
|||||||
.map(|dt| dt.with_timezone(&chrono::Utc));
|
.map(|dt| dt.with_timezone(&chrono::Utc));
|
||||||
|
|
||||||
if is_hard_block {
|
if is_hard_block {
|
||||||
let reset_at = reset_at.unwrap_or_else(|| {
|
let reset_at = match reset_at {
|
||||||
let default = chrono::Utc::now()
|
Some(t) => {
|
||||||
+ chrono::Duration::minutes(5);
|
slog!(
|
||||||
slog!(
|
"[agent:{story_id}:{agent_name}] API rate limit hard block \
|
||||||
"[agent:{story_id}:{agent_name}] API rate limit hard block \
|
(status={status}); resets at {t}"
|
||||||
(status={status}); no reset_at in rate_limit_info, \
|
);
|
||||||
defaulting to 5-minute backoff ({default})"
|
t
|
||||||
);
|
}
|
||||||
default
|
None => {
|
||||||
});
|
let default = chrono::Utc::now()
|
||||||
slog!(
|
+ chrono::Duration::minutes(5);
|
||||||
"[agent:{story_id}:{agent_name}] API rate limit hard block \
|
slog!(
|
||||||
(status={status}); resets at {reset_at}"
|
"[agent:{story_id}:{agent_name}] API rate limit hard block \
|
||||||
);
|
(status={status}); no reset_at in rate_limit_info, \
|
||||||
|
defaulting to 5-minute backoff ({default})"
|
||||||
|
);
|
||||||
|
default
|
||||||
|
}
|
||||||
|
};
|
||||||
let _ = watcher_tx.send(WatcherEvent::RateLimitHardBlock {
|
let _ = watcher_tx.send(WatcherEvent::RateLimitHardBlock {
|
||||||
story_id: story_id.to_string(),
|
story_id: story_id.to_string(),
|
||||||
agent_name: agent_name.to_string(),
|
agent_name: agent_name.to_string(),
|
||||||
@@ -429,11 +434,9 @@ fn run_agent_pty_blocking(
|
|||||||
// Wait for the reader thread to finish so it releases the cloned PTY
|
// Wait for the reader thread to finish so it releases the cloned PTY
|
||||||
// master fd before we return. Without this, the next PTY spawn for the
|
// master fd before we return. Without this, the next PTY spawn for the
|
||||||
// same story can collide with a still-open fd from this session (#453).
|
// same story can collide with a still-open fd from this session (#453).
|
||||||
slog!("[agent:{story_id}:{agent_name}] Waiting for reader thread to exit");
|
|
||||||
if let Err(e) = reader_handle.join() {
|
if let Err(e) = reader_handle.join() {
|
||||||
slog!("[agent:{story_id}:{agent_name}] Reader thread panicked: {e:?}");
|
slog!("[agent:{story_id}:{agent_name}] Reader thread panicked: {e:?}");
|
||||||
}
|
}
|
||||||
slog!("[agent:{story_id}:{agent_name}] Reader thread joined");
|
|
||||||
|
|
||||||
slog!(
|
slog!(
|
||||||
"[agent:{story_id}:{agent_name}] Done. Session: {:?}",
|
"[agent:{story_id}:{agent_name}] Done. Session: {:?}",
|
||||||
|
|||||||
Reference in New Issue
Block a user