Skip to content

Commit

Permalink
refactor: 🚚 rename submit controller to judger
Browse files Browse the repository at this point in the history
  • Loading branch information
Eason0729 committed Dec 5, 2023
1 parent ecfee38 commit 568acea
Show file tree
Hide file tree
Showing 8 changed files with 32 additions and 17 deletions.
38 changes: 26 additions & 12 deletions backend/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions backend/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ tonic-web = "0.9.2"
quick_cache = "0.4.0"
itertools = "0.12.0"
leaky-bucket = "1.0.1"
dashmap = "5.5.3"

[dependencies.tokio-stream]
version = "0.1.14"
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ use crate::{
init::config::{self},
};

use super::{super::submit::Error, SECRET};
use super::{super::judger::Error, SECRET};

const PIPELINE: usize = 8;
const JUDGER_QUE_MAX: usize = 16;
Expand Down
2 changes: 1 addition & 1 deletion backend/src/controller/mod.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
pub mod code;
pub mod crypto;
pub mod duplicate;
pub mod submit;
pub mod judger;
pub mod token;
2 changes: 1 addition & 1 deletion backend/src/endpoint/submit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use super::endpoints::*;
use super::tools::*;

use crate::controller::code::Code;
use crate::controller::submit::SubmitBuilder;
use crate::controller::judger::SubmitBuilder;
use crate::grpc::backend::submit_set_server::*;
use crate::grpc::backend::StateCode as BackendCode;
use crate::grpc::backend::*;
Expand Down
4 changes: 2 additions & 2 deletions backend/src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const MAX_FRAME_SIZE: u32 = 1024 * 1024 * 8;

pub struct Server {
pub token: Arc<token::TokenController>,
pub submit: submit::SubmitController,
pub submit: judger::SubmitController,
pub dup: duplicate::DupController,
pub crypto: crypto::CryptoController,
}
Expand All @@ -35,7 +35,7 @@ impl Server {

let server = Arc::new(Server {
token: token::TokenController::new(),
submit: submit::SubmitController::new(&config).await.unwrap(),
submit: judger::SubmitController::new(&config).await.unwrap(),
dup: duplicate::DupController::default(),
crypto: crypto::CryptoController::new(&config),
});
Expand Down

0 comments on commit 568acea

Please sign in to comment.