Skip to content

Commit

Permalink
update CO
Browse files Browse the repository at this point in the history
  • Loading branch information
Eason0729 committed Feb 1, 2024
1 parent 0424fe5 commit c36f393
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ jobs:
context: .
file: "./backend/Dockerfile"
push: true
tags: "staging"
tags: "ghcr.io/mdcpp/mdoj/backend:staging"
labels: "backend"
- name: build migration
uses: docker/build-push-action@v5
Expand All @@ -92,8 +92,8 @@ jobs:
context: .
file: "./backend/migration/Dockerfile"
push: true
tags: "staging"
labels: "backend/migration"
tags: "ghcr.io/mdcpp/mdoj/migration:staging"
labels: "migration"
- name: build nsjail
run: cd judger && just build-nsjail
- name: build rlua-54
Expand All @@ -105,5 +105,5 @@ jobs:
context: .
file: "./judger/Dockerfile"
push: true
tags: "staging"
tags: "ghcr.io/mdcpp/mdoj/judger:staging"
labels: "judger"
2 changes: 1 addition & 1 deletion backend/src/init/db.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use crate::{controller::crypto::CryptoController, util::auth::RoleLv};

#[instrument(skip_all, name = "construct_db",parent=span)]
/// initialize the database and connection
///
///
/// 1. Connect to database.
/// 2. Check and run migration.(skip when not(feature="standalone"))
/// 3. insert user admin@admin if there is no user.
Expand Down
4 changes: 2 additions & 2 deletions backend/src/init/mod.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
//! Procedural for initialization
//!
//!
//! This module is heavily couple with crate::server and require refactor
pub mod config;
pub mod db;
pub mod error;
pub mod logger;
pub mod logger;
6 changes: 3 additions & 3 deletions backend/src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ use crate::{
const MAX_FRAME_SIZE: u32 = 1024 * 1024 * 8;

/// A wrapper to launch server
///
///
/// [`Server`] doesn't hold state
pub struct Server {
pub token: Arc<token::TokenController>,
Expand All @@ -39,13 +39,13 @@ pub struct Server {

impl Server {
/// Create a new server
///
///
/// It will initialize project's stateful components in following order:
/// 1. Config
/// 2. Logger
/// 3. Crypto Controller
/// 4. Other Controller
///
///
/// Also of note, private/public `*.pem` is loaded during [`Server::start`] instead of this function
pub async fn new() -> Arc<Self> {
let config = config::init().await;
Expand Down

0 comments on commit c36f393

Please sign in to comment.