mirror of
https://github.com/flibusta-apps/fb2converter_server.git
synced 2025-12-06 15:05:37 +01:00
Fix
This commit is contained in:
16
src/main.rs
16
src/main.rs
@@ -1,6 +1,7 @@
|
|||||||
use std::{net::SocketAddr, time::SystemTime};
|
use std::{net::SocketAddr, time::SystemTime, str::FromStr};
|
||||||
use axum::{Router, routing::{post, get}, extract::Multipart, response::{IntoResponse, AppendHeaders, Response}, http::{StatusCode, header, Request, self}, body::StreamBody, middleware::{Next, self}};
|
use axum::{Router, routing::{post, get}, extract::Multipart, response::{IntoResponse, AppendHeaders, Response}, http::{StatusCode, header, Request, self}, body::StreamBody, middleware::{Next, self}};
|
||||||
use axum_prometheus::PrometheusMetricLayer;
|
use axum_prometheus::PrometheusMetricLayer;
|
||||||
|
use sentry::{ClientOptions, types::Dsn, integrations::debug_images::DebugImagesIntegration};
|
||||||
use tokio::{fs::{remove_file, read_dir, remove_dir, File}, io::{AsyncWriteExt, copy}, process::Command};
|
use tokio::{fs::{remove_file, read_dir, remove_dir, File}, io::{AsyncWriteExt, copy}, process::Command};
|
||||||
use tower_http::trace::{TraceLayer, self};
|
use tower_http::trace::{TraceLayer, self};
|
||||||
use tracing::{info, log, Level};
|
use tracing::{info, log, Level};
|
||||||
@@ -210,9 +211,16 @@ async fn main() {
|
|||||||
.compact()
|
.compact()
|
||||||
.init();
|
.init();
|
||||||
|
|
||||||
let _guard = sentry::init(
|
let options = ClientOptions {
|
||||||
std::env::var("SENTRY_DSN").unwrap_or_else(|_| panic!("Cannot get the SENTRY_DSN env variable"))
|
dsn: Some(Dsn::from_str(
|
||||||
);
|
&std::env::var("SENTRY_DSN").unwrap_or_else(|_| panic!("Cannot get the SENTRY_DSN env variable"))).unwrap()
|
||||||
|
),
|
||||||
|
default_integrations: false,
|
||||||
|
..Default::default()
|
||||||
|
}
|
||||||
|
.add_integration(DebugImagesIntegration::new());
|
||||||
|
|
||||||
|
let _guard = sentry::init(options);
|
||||||
|
|
||||||
let addr = SocketAddr::from(([0, 0, 0, 0], 8080));
|
let addr = SocketAddr::from(([0, 0, 0, 0], 8080));
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user