Actually fix dev/release config
This commit is contained in:
parent
db98e7c9e6
commit
732f518145
|
@ -267,7 +267,7 @@ async fn send_accept(
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
const ACCEPT_NON_PUBLIC_NOTES: bool = !cfg!(debug_assertions);
|
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!(debug_assertions);
|
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");
|
||||||
|
|
|
@ -8,9 +8,9 @@ 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!(debug_assertions) {
|
style: if cfg!(debug_assertions) {
|
||||||
Style::Compressed
|
|
||||||
} else {
|
|
||||||
Style::Expanded
|
Style::Expanded
|
||||||
|
} else {
|
||||||
|
Style::Compressed
|
||||||
},
|
},
|
||||||
precision: 3,
|
precision: 3,
|
||||||
};
|
};
|
||||||
|
|
10
src/main.rs
10
src/main.rs
|
@ -43,9 +43,9 @@ async fn main() {
|
||||||
.get_matches();
|
.get_matches();
|
||||||
|
|
||||||
if cfg!(debug_assertions) {
|
if cfg!(debug_assertions) {
|
||||||
info!("Running in release mode");
|
|
||||||
} else {
|
|
||||||
info!("Running in dev mode");
|
info!("Running in dev mode");
|
||||||
|
} else {
|
||||||
|
info!("Running in release mode");
|
||||||
}
|
}
|
||||||
|
|
||||||
match matches.subcommand() {
|
match matches.subcommand() {
|
||||||
|
@ -77,11 +77,11 @@ async fn main() {
|
||||||
|
|
||||||
let sched = JobScheduler::new().await.expect("create JobScheduler");
|
let sched = JobScheduler::new().await.expect("create JobScheduler");
|
||||||
let digest_schedule = if cfg!(debug_assertions) {
|
let digest_schedule = if cfg!(debug_assertions) {
|
||||||
// every day at midnight utc
|
|
||||||
"0 0 0 * * * *"
|
|
||||||
} else {
|
|
||||||
// every 5 minutes in debug
|
// every 5 minutes in debug
|
||||||
"0 1/5 * * * *"
|
"0 1/5 * * * *"
|
||||||
|
} else {
|
||||||
|
// every day at midnight utc
|
||||||
|
"0 0 0 * * * *"
|
||||||
};
|
};
|
||||||
let pool_ = pool.clone();
|
let pool_ = pool.clone();
|
||||||
sched
|
sched
|
||||||
|
|
Loading…
Reference in New Issue