Improve config system
Add pkl to generate configs
This commit is contained in:
parent
8785186dfa
commit
b2ff632e64
47 changed files with 916 additions and 277 deletions
emgauwa-controller/src
|
@ -4,7 +4,7 @@ use emgauwa_lib::db::{DbController, DbJunctionRelaySchedule, DbRelay, DbSchedule
|
|||
use emgauwa_lib::errors::EmgauwaError;
|
||||
use emgauwa_lib::models::{Controller, FromDbModel};
|
||||
use emgauwa_lib::types::ControllerUid;
|
||||
use emgauwa_lib::utils::init_logging;
|
||||
use emgauwa_lib::utils::{drop_privileges, init_logging};
|
||||
use sqlx::pool::PoolConnection;
|
||||
use sqlx::Sqlite;
|
||||
|
||||
|
@ -59,6 +59,9 @@ async fn create_this_relay(
|
|||
#[actix::main]
|
||||
async fn main() -> Result<(), std::io::Error> {
|
||||
let settings = settings::init()?;
|
||||
|
||||
drop_privileges(&settings.permissions)?;
|
||||
|
||||
init_logging(&settings.logging.level)?;
|
||||
|
||||
let pool = db::init(&settings.database)
|
||||
|
@ -105,7 +108,7 @@ async fn main() -> Result<(), std::io::Error> {
|
|||
|
||||
let url = format!(
|
||||
"ws://{}:{}/api/v1/ws/controllers",
|
||||
settings.core.host, settings.core.port
|
||||
settings.server.host, settings.server.port
|
||||
);
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue