config changed + using preboot remote server
parent
cc8d949dc4
commit
529247a839
|
|
@ -1,6 +1,5 @@
|
|||
{
|
||||
"dateOfCreation": "1721381809112",
|
||||
"configServer": "192.168.2.37",
|
||||
"processes": [
|
||||
{
|
||||
"name": "temp-process",
|
||||
|
|
|
|||
|
|
@ -177,7 +177,7 @@ pub mod v2 {
|
|||
};
|
||||
}
|
||||
};
|
||||
match get_redis_connection(&local_config.config_server).await {
|
||||
match get_redis_connection(¶ms.remote_server_url).await {
|
||||
Some(mut conn) => {
|
||||
let mut pub_sub = conn.as_pubsub();
|
||||
let channel_name = get_container_id().unwrap_or(String::from("default"));
|
||||
|
|
@ -879,13 +879,11 @@ mod config_unittests {
|
|||
// old one (kinda local)
|
||||
let a = Processes {
|
||||
date_of_creation: String::from("1"),
|
||||
config_server: String::new(),
|
||||
processes: vec![],
|
||||
};
|
||||
// new one (kinda remote)
|
||||
let b = Processes {
|
||||
date_of_creation: String::from("2"),
|
||||
config_server: String::new(),
|
||||
processes: vec![],
|
||||
};
|
||||
|
||||
|
|
@ -900,7 +898,6 @@ mod config_unittests {
|
|||
fn save_config() {
|
||||
let a = Processes {
|
||||
date_of_creation: String::from("1"),
|
||||
config_server: String::new(),
|
||||
processes: vec![],
|
||||
};
|
||||
assert!(save_new_config(&a, "tests/examples/save-conf.json").is_ok());
|
||||
|
|
@ -910,7 +907,6 @@ mod config_unittests {
|
|||
fn save_to_zero_file() {
|
||||
let a = Processes {
|
||||
date_of_creation: String::from("1"),
|
||||
config_server: String::new(),
|
||||
processes: vec![],
|
||||
};
|
||||
assert!(save_new_config(&a, "tests/examples/none.json").is_ok());
|
||||
|
|
|
|||
|
|
@ -141,8 +141,6 @@ pub struct Processes {
|
|||
// runner_id: usize,
|
||||
#[serde(rename = "dateOfCreation")]
|
||||
pub date_of_creation: String,
|
||||
#[serde(rename = "configServer")]
|
||||
pub config_server: String,
|
||||
#[serde(default)]
|
||||
pub processes: Vec<TrackingProcess>,
|
||||
}
|
||||
|
|
@ -151,7 +149,6 @@ impl Default for Processes {
|
|||
fn default() -> Self {
|
||||
Self {
|
||||
date_of_creation : String::new(),
|
||||
config_server : String::from("default"),
|
||||
processes : Vec::new(),
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue