Skip to content

Commit

Permalink
Attempt to tune the GitHub queue read timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
bobbobbio committed Jan 1, 2025
1 parent c92a876 commit c9a57cb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions crates/maelstrom-github/src/queue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ enum MessageHeader {
Shutdown,
}

const DEFAULT_READ_TIMEOUT: Duration = Duration::from_secs(10);
const DEFAULT_READ_TIMEOUT: Duration = Duration::from_secs(60);

pub struct GitHubReadQueue<BlobT = BlobClient> {
blob: BlobT,
Expand Down Expand Up @@ -260,7 +260,7 @@ impl<BlobT: QueueBlob> GitHubQueue<BlobT> {
ConnT: QueueConnection<Blob = BlobT>,
{
Ok(Self {
write: GitHubWriteQueue::new(conn, read_timeout / 2, write_key).await?,
write: GitHubWriteQueue::new(conn, read_timeout / 4, write_key).await?,
read: GitHubReadQueue::new(conn, read_timeout, read_backend_ids, read_key).await?,
})
}
Expand All @@ -278,7 +278,7 @@ impl<BlobT: QueueBlob> GitHubQueue<BlobT> {
let self_id = uuid::Uuid::new_v4().to_string();

let write_key = format!("{self_id}-{key}-up");
let write = GitHubWriteQueue::new(conn, DEFAULT_READ_TIMEOUT / 2, &write_key).await?;
let write = GitHubWriteQueue::new(conn, DEFAULT_READ_TIMEOUT / 4, &write_key).await?;

let read_key = format!("{self_id}-{key}-down");
wait_for_artifact(conn, &read_key).await?;
Expand Down

0 comments on commit c9a57cb

Please sign in to comment.