Configurable debt-reporter

This commit is contained in:
Tony Garnock-Jones 2021-08-25 16:11:15 +02:00
parent d4f7988539
commit 051843b832
1 changed files with 7 additions and 1 deletions

View File

@ -35,12 +35,14 @@ struct ServerConfig {
#[structopt(short = "s", long = "socket")]
sockets: Vec<PathBuf>,
#[structopt(long)]
debt_reporter: bool,
}
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
syndicate::convenient_logging()?;
syndicate::actor::start_debt_reporter();
let config = Arc::new(ServerConfig::from_args());
@ -81,6 +83,10 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
tracing::trace!("startup");
if config.debt_reporter {
syndicate::actor::start_debt_reporter();
}
let ds = Cap::new(&Actor::create_and_start(syndicate::name!("dataspace"), Dataspace::new()));
let gateway = Cap::guard(&Actor::create_and_start(
syndicate::name!("gateway"),