From c36f393f1bf2de532b0e38f8bc1eb0cdd073ef7f Mon Sep 17 00:00:00 2001 From: Eason <30045503+Eason0729@users.noreply.github.com> Date: Thu, 1 Feb 2024 14:46:32 +0800 Subject: [PATCH] update CO --- .github/workflows/staging.yml | 8 ++++---- backend/src/init/db.rs | 2 +- backend/src/init/mod.rs | 4 ++-- backend/src/server.rs | 6 +++--- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/staging.yml b/.github/workflows/staging.yml index 28a2c492..f8989727 100644 --- a/.github/workflows/staging.yml +++ b/.github/workflows/staging.yml @@ -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 @@ -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 @@ -105,5 +105,5 @@ jobs: context: . file: "./judger/Dockerfile" push: true - tags: "staging" + tags: "ghcr.io/mdcpp/mdoj/judger:staging" labels: "judger" \ No newline at end of file diff --git a/backend/src/init/db.rs b/backend/src/init/db.rs index 8caa242f..0916f86c 100644 --- a/backend/src/init/db.rs +++ b/backend/src/init/db.rs @@ -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. diff --git a/backend/src/init/mod.rs b/backend/src/init/mod.rs index d987d2c6..33abc9e0 100644 --- a/backend/src/init/mod.rs +++ b/backend/src/init/mod.rs @@ -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; \ No newline at end of file +pub mod logger; diff --git a/backend/src/server.rs b/backend/src/server.rs index fa62651d..20f0daaf 100644 --- a/backend/src/server.rs +++ b/backend/src/server.rs @@ -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, @@ -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 { let config = config::init().await;