Skip to content

Commit

Permalink
Merge pull request #14 from spiralover/feat/cache
Browse files Browse the repository at this point in the history
feat(cache): advanced cache & fixed auth issues
  • Loading branch information
Ahmard authored Feb 17, 2024
2 parents 5401508 + 2e4de34 commit 7851e16
Show file tree
Hide file tree
Showing 143 changed files with 1,556 additions and 557 deletions.
2 changes: 1 addition & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
/.github
/.gitignore
#/apps
#/core
#/cosmic
/target
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ jobs:
- name: Run Clippy
run: cargo clippy --all-targets --all-features
- name: Run Tests
run: cargo test --workspace --verbose --exclude core
run: cargo test --workspace --verbose --exclude cosmic
181 changes: 159 additions & 22 deletions Cargo.lock

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

3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[workspace]
resolver="2"
members = [
"core",
"cosmic",
"apps/user",
"apps/executor"
]
Expand All @@ -28,6 +28,7 @@ futures = "0.3"
actix-multipart = "0.6.0"
strum_macros = "0.25.1"
jsonwebtoken = "9.1.0"
mobc = { version = "0.8", features = ["tokio"] }
serde = { version = "1.0", features = ["derive"] }
uuid = { version = "1", features = ["v4", "serde"] }
chrono = { version = "0.4", features = ["serde"] }
Expand Down
2 changes: 1 addition & 1 deletion apps/executor/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ redis = { workspace = true }
futures-util = { workspace = true }
diesel = { workspace = true }
reqwest = { workspace = true }
core = { path = "../../core" }
cosmic = { path = "../../cosmic" }

2 changes: 1 addition & 1 deletion apps/executor/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ WORKDIR /var/www/mailer/apps/executor
# copy files
COPY apps/executor/.env.example .env

RUN rm apps core docs examples .github -rf
RUN rm apps cosmic docs examples .github -rf

# Copy our built binary
COPY --from=build /target/release/executor /usr/local/bin/executor
Expand Down
2 changes: 1 addition & 1 deletion apps/executor/src/background_service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use log::info;
use crate::queue_handler::{
handle_awaiting_queue, handle_failure_queue, handle_processing_queue, handle_success_queue,
};
use core::app_state::AppState;
use cosmic::app_state::AppState;

pub(crate) fn create_background_service(app: &AppState, name: String, features_per_worker: i8) {
info!("preparing thread: {}", name.clone());
Expand Down
4 changes: 2 additions & 2 deletions apps/executor/src/http/mod.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use crate::http::system_controller::system_controller;
use core::http::kernel::{Controller, Route};
use core::http::middlewares::auth_middleware::AuthMiddleware;
use cosmic::http::kernel::{Controller, Route};
use cosmic::http::middlewares::auth_middleware::AuthMiddleware;

pub(crate) mod system_controller;

Expand Down
6 changes: 3 additions & 3 deletions apps/executor/src/http/system_controller.rs
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
use actix_web::get;
use actix_web::web::ServiceConfig;

use core::enums::app_message::AppMessage;
use core::results::HttpResult;
use cosmic::enums::app_message::AppMessage;
use cosmic::results::HttpResult;

pub(crate) fn system_controller(cfg: &mut ServiceConfig) {
cfg.service(docker_test);
}

#[get("docker-health-check")]
async fn docker_test() -> HttpResult {
AppMessage::SuccessMessage("received").ok()
AppMessage::SuccessMessageStr("received").ok()
}
Loading

0 comments on commit 7851e16

Please sign in to comment.