Skip to content

Commit

Permalink
removed more old code
Browse files Browse the repository at this point in the history
  • Loading branch information
worldofjoni committed Sep 28, 2023
1 parent fe86117 commit ec7474a
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 17 deletions.
4 changes: 0 additions & 4 deletions backend/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,6 @@ ADMIN_EMAIL=
# --- scheduling ---
#FULL_PARSE_SCHEDULE=
#UPDATE_PARSE_SCHEDULE=
#IMAGE_REVIEW_SCHEDULE=

# --- flickr ---
FLICKR_API_KEY=

# --- mensa parser ---
#CLIENT_TIMEOUT=
Expand Down
2 changes: 1 addition & 1 deletion backend/src/interface/mod.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/// Module bundle for interface models
//! Module bundle for interface models
pub mod admin_notification;
pub mod api_command;
pub mod file_handler;
Expand Down
2 changes: 1 addition & 1 deletion backend/src/layer/logic/api_command/test/mocks.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! This crate contains mocks of [`CommandDataAccess`] and [`ImageHoster`] and [`AdminNotification`] for testing.
//! This crate contains mocks of [`CommandDataAccess`], [`FileHandler`], [`ImageValidation`] and [`AdminNotification`] for testing.

use async_trait::async_trait;

Expand Down
5 changes: 0 additions & 5 deletions backend/src/layer/trigger/scheduling/scheduler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ use tracing::{info, info_span, Instrument};
///
/// **Important:** Unlike regular cron expressions, seconds also have to be specified, see [here](https://lib.rs/crates/tokio-cron-scheduler).
pub struct ScheduleInfo {
/// Cron-like schedule for running the image review process to check for no longer existing images, see [`ImageReviewScheduling`].
pub image_review_schedule: String,
/// Cron-like schedule for running the meal plan update process for the current day's meal plan, see [`MensaParseScheduling`].
pub update_parse_schedule: String,
/// Cron-like schedule for running the meal plan update process for all available meal plan data, see [`MensaParseScheduling`].
Expand Down Expand Up @@ -161,7 +159,6 @@ mod tests {
let info = ScheduleInfo {
full_parse_schedule: "*/1 * * * * *".into(),
update_parse_schedule: "*/2 * * * * *".into(),
image_review_schedule: "*/5 * * * * *".into(),
};
let mensa_parser = MensaParseMock::default();

Expand Down Expand Up @@ -190,7 +187,6 @@ mod tests {
let info = ScheduleInfo {
full_parse_schedule: "*/1 * * * * *".into(),
update_parse_schedule: "*/2 * * * * *".into(),
image_review_schedule: "*/5 * * * * *".into(),
};
let mensa_parser = MensaParseMock::default();

Expand All @@ -206,7 +202,6 @@ mod tests {
let info = ScheduleInfo {
full_parse_schedule: "*/1 * * * * *".into(),
update_parse_schedule: "*/2 * * * * *".into(),
image_review_schedule: "*/5 * * * * *".into(),
};
let mensa_parser = MensaParseMock::default();

Expand Down
6 changes: 2 additions & 4 deletions backend/src/startup/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,12 +101,10 @@ impl ConfigReader {
.unwrap_or_else(|_| DEFAULT_NIGHTLY_SCHEDULE.into()),
update_parse_schedule: env::var("UPDATE_PARSE_SCHEDULE")
.unwrap_or_else(|_| DEFAULT_UPDATE_PARSE_SCHEDULE.into()),
image_review_schedule: env::var("IMAGE_REVIEW_SCHEDULE")
.unwrap_or_else(|_| DEFAULT_NIGHTLY_SCHEDULE.into()),
};
info!(
"Running full parsing on `{}`, update parsing on `{}` and image reviews on `{}`",
info.full_parse_schedule, info.update_parse_schedule, info.image_review_schedule
"Running full parsing on `{}` and update parsing on `{}`",
info.full_parse_schedule, info.update_parse_schedule
);
Ok(info)
}
Expand Down
2 changes: 0 additions & 2 deletions backend/tests/mensa_parse_scheduling.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ async fn test_full_mensa_parse_scheduling() {
let info = ScheduleInfo {
full_parse_schedule: "0 */5 * * * *".to_string(),
update_parse_schedule: NEVER.to_string(),
image_review_schedule: NEVER.to_string(),
};
let mut scheduler = setup(info).await;
scheduler.start().await;
Expand All @@ -32,7 +31,6 @@ async fn test_update_mensa_parse_scheduling() {
let info = ScheduleInfo {
full_parse_schedule: NEVER.to_string(),
update_parse_schedule: "0 */5 * * * *".to_string(),
image_review_schedule: NEVER.to_string(),
};
let mut scheduler = setup(info).await;
scheduler.start().await;
Expand Down

0 comments on commit ec7474a

Please sign in to comment.