@ -26,6 +26,7 @@ mod interval;
mod config ;
mod config ;
mod live ;
mod live ;
mod context ;
mod context ;
mod job ;
mod job ;
@ -80,6 +81,7 @@ fn print_stats()
static ref BUILD_IDENT : recolored ::ColoredString = "release" . bright_red ( ) ;
static ref BUILD_IDENT : recolored ::ColoredString = "release" . bright_red ( ) ;
}
}
#[ allow(unused_imports) ]
use std ::ops ::Deref ;
use std ::ops ::Deref ;
status ! ( "This is the lolicron daemon version {} by {} ({} build)" , env! ( "CARGO_PKG_VERSION" ) , & AUTHORS [ .. ] , BUILD_IDENT . deref ( ) ) ;
status ! ( "This is the lolicron daemon version {} by {} ({} build)" , env! ( "CARGO_PKG_VERSION" ) , & AUTHORS [ .. ] , BUILD_IDENT . deref ( ) ) ;
status ! ( "---" ) ;
status ! ( "---" ) ;
@ -92,6 +94,12 @@ fn print_stats()
#[ cfg(feature= " threaded " ) ] status ! ( " +threaded" . red ( ) ) ;
#[ cfg(feature= " threaded " ) ] status ! ( " +threaded" . red ( ) ) ;
#[ cfg(not(feature= " threaded " )) ] status ! ( " -threaded" . bright_blue ( ) ) ;
#[ cfg(not(feature= " threaded " )) ] status ! ( " -threaded" . bright_blue ( ) ) ;
#[ cfg(feature= " watcher " ) ] status ! ( " +watcher" . red ( ) ) ;
#[ cfg(not(feature= " watcher " )) ] status ! ( " -watcher" . bright_blue ( ) ) ;
#[ cfg(feature= " debug_logger " ) ] status ! ( " +debug_logger" . red ( ) ) ;
#[ cfg(not(feature= " debug_logger " )) ] status ! ( " -debug_logger" . bright_blue ( ) ) ;
#[ cfg(feature= " watcher_unlimited " ) ] status ! ( " +watcher_unlimited" . bright_red ( ) ) ;
#[ cfg(feature= " watcher_unlimited " ) ] status ! ( " +watcher_unlimited" . bright_red ( ) ) ;
#[ cfg(not(feature= " watcher_unlimited " )) ] status ! ( " -watcher_unlimited" . blue ( ) ) ;
#[ cfg(not(feature= " watcher_unlimited " )) ] status ! ( " -watcher_unlimited" . blue ( ) ) ;
@ -111,21 +119,24 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
log ::init ( log ::Level ::Debug ) ;
log ::init ( log ::Level ::Debug ) ;
debug ! ( "Logger initialised" ) ;
debug ! ( "Logger initialised" ) ; //TODO: Parse config first
print_stats ( ) ;
print_stats ( ) ;
let oneesan = live ::watch ( "." ) ;
#[ cfg(feature= " watcher " ) ]
{
{
let mut recv = oneesan . hook ( "src/main.rs" , live ::filter ::ALL ) . await ;
let oneesan = live ::watch ( "." ) ;
while let Some ( event ) = recv . recv ( ) . await
{
{
important ! ( "Got ev {:?}" , event ) ;
let mut recv = oneesan . hook ( "src/main.rs" , live ::filter ::ALL ) . await ;
break ;
while let Some ( event ) = recv . recv ( ) . await
{
important ! ( "Got ev {:?}" , event ) ;
break ;
}
}
}
}
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" ) ) ;