1
0
Fork 0
forked from alemi/upub

fix: print what's getting started

This commit is contained in:
əlemi 2024-06-06 02:32:55 +02:00
parent 93666cea97
commit a3decfea95
Signed by: alemi
GPG key ID: A4895B84D311642C
3 changed files with 4 additions and 2 deletions

View file

@ -94,6 +94,7 @@ pub enum CliCommand {
}
pub async fn run(ctx: upub::Context, command: CliCommand) -> Result<(), Box<dyn std::error::Error>> {
tracing::info!("running cli task: {command:?}");
match command {
CliCommand::Faker { count } =>
Ok(faker(ctx, count as i64).await?),

View file

@ -49,9 +49,9 @@ pub async fn serve(ctx: upub::Context, bind: String) -> Result<(), std::io::Erro
.mastodon_routes() // no-op if mastodon feature is disabled
.with_state(ctx);
// run our app with hyper, listening locally on port 3000
let listener = tokio::net::TcpListener::bind(bind).await?;
tracing::info!("serving api routes on {bind}");
let listener = tokio::net::TcpListener::bind(bind).await?;
axum::serve(listener, router).await?;
Ok(())

View file

@ -13,6 +13,7 @@ pub fn spawn(
) -> tokio::task::JoinHandle<()> {
use dispatcher::JobDispatcher;
tokio::spawn(async move {
tracing::info!("starting worker task");
ctx.run(concurrency, poll, filter).await
})
}