Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/github/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ use crate::templates::{
use crate::{BorsGlobalEvent, BorsRepositoryEvent, PgDbClient, TeamApiClient};

use super::AppError;
use super::GithubRepoName;
use crate::utils::sort_queue::sort_queue_prs;
use anyhow::Error;
use axum::Router;
use axum::extract::{Path, State};
Expand All @@ -34,8 +36,6 @@ use tower::limit::ConcurrencyLimitLayer;
use tower_http::catch_panic::CatchPanicLayer;
use tracing::{Instrument, Span};

use super::GithubRepoName;

/// Shared server state for all axum handlers.
pub struct ServerState {
repository_event_queue: mpsc::Sender<BorsRepositoryEvent>,
Expand Down Expand Up @@ -150,6 +150,7 @@ async fn queue_handler(
};

let prs = state.db.get_nonclosed_pull_requests(&repo.name).await?;
let prs = sort_queue_prs(prs);

let (in_queue_count, failed_count, rolled_up_count) =
prs.iter()
Expand Down