Fix panic?????????

This commit is contained in:
jude 2024-03-25 06:07:30 +00:00
parent 016164affb
commit 8ae311190f

View File

@ -26,7 +26,10 @@ use sqlx::{
Executor,
};
use crate::{metrics::REMINDER_COUNTER, Database};
use crate::{
metrics::{REMINDER_COUNTER, REMINDER_FAIL_COUNTER},
Database,
};
lazy_static! {
pub static ref TIMEFROM_REGEX: Regex =
@ -442,7 +445,9 @@ impl Reminder {
None => error.to_string(),
};
REMINDER_COUNTER.with_label_values(&[self.channel_id.to_string().as_str(), &message]).inc();
REMINDER_FAIL_COUNTER
.with_label_values(&[self.channel_id.to_string().as_str(), &message])
.inc();
error!("[Reminder {}] {}", self.id, message);
}