forked from alemi/upub
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>> {
|
||||
tracing::info!("running cli task: {command:?}");
|
||||
match command {
|
||||
CliCommand::Faker { count } =>
|
||||
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
|
||||
.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(())
|
||||
|
|
|
@ -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
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue