mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-09 07:17:56 +00:00
feat: add global component tag to rust json logs, add sentry, some cleanup
This commit is contained in:
parent
0600ae00ff
commit
701bafdf97
11 changed files with 321 additions and 49 deletions
|
|
@ -4,12 +4,8 @@ use sqlx::prelude::FromRow;
|
|||
use std::{sync::Arc, time::Duration};
|
||||
use tracing::{error, info};
|
||||
|
||||
#[tokio::main]
|
||||
async fn main() -> anyhow::Result<()> {
|
||||
libpk::init_logging("avatar_cleanup")?;
|
||||
libpk::init_metrics()?;
|
||||
info!("hello world");
|
||||
|
||||
libpk::main!("avatar_cleanup");
|
||||
async fn real_main() -> anyhow::Result<()> {
|
||||
let config = libpk::config
|
||||
.avatars
|
||||
.as_ref()
|
||||
|
|
@ -129,7 +125,7 @@ async fn cleanup_job(pool: sqlx::PgPool, bucket: Arc<s3::Bucket>) -> anyhow::Res
|
|||
}
|
||||
_ => {
|
||||
let status = cf_resp.status();
|
||||
println!("{:#?}", cf_resp.text().await?);
|
||||
tracing::info!("raw response from cloudflare: {:#?}", cf_resp.text().await?);
|
||||
anyhow::bail!("cloudflare returned bad error code {}", status);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -142,12 +142,8 @@ pub struct AppState {
|
|||
config: Arc<AvatarsConfig>,
|
||||
}
|
||||
|
||||
#[tokio::main]
|
||||
async fn main() -> anyhow::Result<()> {
|
||||
libpk::init_logging("avatars")?;
|
||||
libpk::init_metrics()?;
|
||||
info!("hello world");
|
||||
|
||||
libpk::main!("avatars");
|
||||
async fn real_main() -> anyhow::Result<()> {
|
||||
let config = libpk::config
|
||||
.avatars
|
||||
.as_ref()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue