Skip to content

Commit

Permalink
Revert "Adding Redis support (wip) (#1755)" (#1774)
Browse files Browse the repository at this point in the history
This reverts commit d76cbb4.
  • Loading branch information
cjus authored Sep 25, 2024
1 parent c81da8d commit 3d9230e
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 616 deletions.
48 changes: 3 additions & 45 deletions Cargo.lock

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

1 change: 0 additions & 1 deletion apps/framework-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ sha2 = "0.10.8"
hex = "0.4.2"
constant_time_eq = "0.3.0"
tokio-cron-scheduler = "0.11.0"
redis = { version = "0.23.3", features = ["aio", "tokio-comp"] }
indexmap = "2.5.0"

[dev-dependencies]
Expand Down
15 changes: 5 additions & 10 deletions apps/framework-cli/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -334,10 +334,9 @@ async fn top_command_handler(
arc_metrics.start_listening_to_metrics(rx).await;

check_project_name(&project_arc.name())?;
let project_arc_clone = Arc::clone(&project_arc);
run_local_infrastructure(&project_arc_clone)?.show();
run_local_infrastructure(&project_arc)?.show();

routines::start_development_mode(project_arc_clone, &settings.features, arc_metrics)
routines::start_development_mode(project_arc, &settings.features, arc_metrics)
.await
.map_err(|e| {
RoutineFailure::error(Message {
Expand Down Expand Up @@ -514,13 +513,9 @@ async fn top_command_handler(

check_project_name(&project_arc.name())?;

routines::start_production_mode(
Arc::clone(&project_arc),
settings.features,
arc_metrics,
)
.await
.unwrap();
routines::start_production_mode(project_arc, settings.features, arc_metrics)
.await
.unwrap();

wait_for_usage_capture(capture_handle).await;

Expand Down
13 changes: 1 addition & 12 deletions apps/framework-cli/src/cli/routines.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,6 @@ use crate::infrastructure::processes::consumption_registry::ConsumptionProcessRe
use crate::infrastructure::processes::functions_registry::FunctionProcessRegistry;
use crate::infrastructure::processes::kafka_clickhouse_sync::SyncingProcessesRegistry;
use crate::infrastructure::processes::process_registry::ProcessRegistries;
use crate::infrastructure::redis::redis_client::RedisClient;
use crate::infrastructure::stream::redpanda::fetch_topics;
use crate::project::Project;

Expand Down Expand Up @@ -172,7 +171,7 @@ impl RoutineSuccess {
}

pub fn show(&self) {
show_message!(self.message_type, self.message.clone());
show_message!(self.message_type, self.message);
}
}

Expand Down Expand Up @@ -280,9 +279,6 @@ pub async fn start_development_mode(
}
);

let mut redis_client = RedisClient::new(&project.name()).await?;
redis_client.start_periodic_tasks();

let server_config = project.http_server_config.clone();
let web_server = Webserver::new(
server_config.host.clone(),
Expand Down Expand Up @@ -468,8 +464,6 @@ pub async fn start_development_mode(
.await;
};

let _ = redis_client.stop_periodic_tasks();

Ok(())
}

Expand All @@ -487,9 +481,6 @@ pub async fn start_production_mode(
}
);

let mut redis_client = RedisClient::new(&project.name()).await?;
redis_client.start_periodic_tasks();

let server_config = project.http_server_config.clone();
let web_server = Webserver::new(
server_config.host.clone(),
Expand Down Expand Up @@ -616,8 +607,6 @@ pub async fn start_production_mode(
.await;
}

let _ = redis_client.stop_periodic_tasks();

Ok(())
}

Expand Down
1 change: 0 additions & 1 deletion apps/framework-cli/src/infrastructure.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,4 @@ pub mod ingest;
pub mod migration;
pub mod olap;
pub mod processes;
pub mod redis;
pub mod stream;
1 change: 0 additions & 1 deletion apps/framework-cli/src/infrastructure/redis.rs

This file was deleted.

Loading

0 comments on commit 3d9230e

Please sign in to comment.