|
|
@ -15,6 +15,7 @@ use tokio::{
|
|
|
|
},
|
|
|
|
},
|
|
|
|
task,
|
|
|
|
task,
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
use lazy_static::lazy_static;
|
|
|
|
|
|
|
|
|
|
|
|
mod util;
|
|
|
|
mod util;
|
|
|
|
use util::*;
|
|
|
|
use util::*;
|
|
|
@ -60,13 +61,34 @@ async fn do_thing_every() -> Result<(mpsc::Sender<()>, task::JoinHandle<()>), Bo
|
|
|
|
Ok((tx, handle))
|
|
|
|
Ok((tx, handle))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fn print_stats()
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
lazy_static! {
|
|
|
|
|
|
|
|
static ref AUTHORS: String = env!("CARGO_PKG_AUTHORS").replace( ":", ", ");
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
status!("This is the lolicron daemon version {} by {}", env!("CARGO_PKG_VERSION"), &AUTHORS[..]);
|
|
|
|
|
|
|
|
status!("---");
|
|
|
|
|
|
|
|
status!("Compiled with:");
|
|
|
|
|
|
|
|
#[cfg(nightly)] status!(" +nightly");
|
|
|
|
|
|
|
|
#[cfg(debug_assertions)] status!(" +debug_assertions");
|
|
|
|
|
|
|
|
status!("features:");
|
|
|
|
|
|
|
|
#[cfg(feature="threaded")] status!(" +threaded");
|
|
|
|
|
|
|
|
status!("");
|
|
|
|
|
|
|
|
status!("GPl'd with <3");
|
|
|
|
|
|
|
|
status!("Please enjoy");
|
|
|
|
|
|
|
|
status!("---");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#[tokio::main]
|
|
|
|
#[tokio::main]
|
|
|
|
async fn main() -> Result<(), Box<dyn std::error::Error>> {
|
|
|
|
async fn main() -> Result<(), Box<dyn std::error::Error>> {
|
|
|
|
|
|
|
|
|
|
|
|
log::init(log::Level::Debug);
|
|
|
|
log::init(log::Level::Debug);
|
|
|
|
|
|
|
|
|
|
|
|
debug!("Initialised");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
debug!("Logger initialised");
|
|
|
|
|
|
|
|
print_stats();
|
|
|
|
|
|
|
|
|
|
|
|
let oneesan = live::watch(".");
|
|
|
|
let oneesan = live::watch(".");
|
|
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -81,8 +103,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
|
|
|
|
oneesan.shutdown().await.expect("oneesan panic");
|
|
|
|
oneesan.shutdown().await.expect("oneesan panic");
|
|
|
|
|
|
|
|
|
|
|
|
println!("{:?}", config::parse_global_single("example.rori").await.expect("Waaaaaah"));
|
|
|
|
println!("{:?}", config::parse_global_single("example.rori").await.expect("Waaaaaah"));
|
|
|
|
dangerous!("Wheeeee");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//let (mut tx, h) = do_thing_every().await?;
|
|
|
|
//let (mut tx, h) = do_thing_every().await?;
|
|
|
|
|
|
|
|
|
|
|
|
// loop {
|
|
|
|
// loop {
|
|
|
|