Fix release mode compilation condition
This commit is contained in:
parent
ec4190e330
commit
db98e7c9e6
|
@ -267,7 +267,7 @@ async fn send_accept(
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
const ACCEPT_NON_PUBLIC_NOTES: bool = !cfg!(release);
|
const ACCEPT_NON_PUBLIC_NOTES: bool = !cfg!(debug_assertions);
|
||||||
|
|
||||||
async fn handle_create_note(
|
async fn handle_create_note(
|
||||||
_create: AcceptedActivity,
|
_create: AcceptedActivity,
|
||||||
|
|
|
@ -53,7 +53,7 @@ pub fn conversation_context() -> AnyBase {
|
||||||
.unwrap()
|
.unwrap()
|
||||||
}
|
}
|
||||||
|
|
||||||
const ACCEPT_INVALID_CERTS: bool = !cfg!(release);
|
const ACCEPT_INVALID_CERTS: bool = !cfg!(debug_assertions);
|
||||||
pub static CLIENT: Lazy<Client> = Lazy::new(|| {
|
pub static CLIENT: Lazy<Client> = Lazy::new(|| {
|
||||||
if ACCEPT_INVALID_CERTS {
|
if ACCEPT_INVALID_CERTS {
|
||||||
warn!("Accepting invalid certs for ActivityPub request");
|
warn!("Accepting invalid certs for ActivityPub request");
|
||||||
|
|
|
@ -7,7 +7,7 @@ const CHARSET: &'static str = r#"@charset "UTF-8";"#;
|
||||||
|
|
||||||
pub fn generate() -> anyhow::Result<()> {
|
pub fn generate() -> anyhow::Result<()> {
|
||||||
let format = Format {
|
let format = Format {
|
||||||
style: if cfg!(release) {
|
style: if cfg!(debug_assertions) {
|
||||||
Style::Compressed
|
Style::Compressed
|
||||||
} else {
|
} else {
|
||||||
Style::Expanded
|
Style::Expanded
|
||||||
|
|
|
@ -42,7 +42,7 @@ async fn main() {
|
||||||
)
|
)
|
||||||
.get_matches();
|
.get_matches();
|
||||||
|
|
||||||
if cfg!(release) {
|
if cfg!(debug_assertions) {
|
||||||
info!("Running in release mode");
|
info!("Running in release mode");
|
||||||
} else {
|
} else {
|
||||||
info!("Running in dev mode");
|
info!("Running in dev mode");
|
||||||
|
@ -76,7 +76,7 @@ async fn main() {
|
||||||
});
|
});
|
||||||
|
|
||||||
let sched = JobScheduler::new().await.expect("create JobScheduler");
|
let sched = JobScheduler::new().await.expect("create JobScheduler");
|
||||||
let digest_schedule = if cfg!(release) {
|
let digest_schedule = if cfg!(debug_assertions) {
|
||||||
// every day at midnight utc
|
// every day at midnight utc
|
||||||
"0 0 0 * * * *"
|
"0 0 0 * * * *"
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue