fix: print what's getting started
This commit is contained in:
parent
93666cea97
commit
a3decfea95
3 changed files with 4 additions and 2 deletions
|
@ -94,6 +94,7 @@ pub enum CliCommand {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub async fn run(ctx: upub::Context, command: CliCommand) -> Result<(), Box<dyn std::error::Error>> {
|
pub async fn run(ctx: upub::Context, command: CliCommand) -> Result<(), Box<dyn std::error::Error>> {
|
||||||
|
tracing::info!("running cli task: {command:?}");
|
||||||
match command {
|
match command {
|
||||||
CliCommand::Faker { count } =>
|
CliCommand::Faker { count } =>
|
||||||
Ok(faker(ctx, count as i64).await?),
|
Ok(faker(ctx, count as i64).await?),
|
||||||
|
|
|
@ -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
|
.mastodon_routes() // no-op if mastodon feature is disabled
|
||||||
.with_state(ctx);
|
.with_state(ctx);
|
||||||
|
|
||||||
// run our app with hyper, listening locally on port 3000
|
tracing::info!("serving api routes on {bind}");
|
||||||
let listener = tokio::net::TcpListener::bind(bind).await?;
|
|
||||||
|
|
||||||
|
let listener = tokio::net::TcpListener::bind(bind).await?;
|
||||||
axum::serve(listener, router).await?;
|
axum::serve(listener, router).await?;
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
|
|
|
@ -13,6 +13,7 @@ pub fn spawn(
|
||||||
) -> tokio::task::JoinHandle<()> {
|
) -> tokio::task::JoinHandle<()> {
|
||||||
use dispatcher::JobDispatcher;
|
use dispatcher::JobDispatcher;
|
||||||
tokio::spawn(async move {
|
tokio::spawn(async move {
|
||||||
|
tracing::info!("starting worker task");
|
||||||
ctx.run(concurrency, poll, filter).await
|
ctx.run(concurrency, poll, filter).await
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue