delete unnecessary println
All checks were successful
Build && Deploy / cargo build (push) Successful in 1m5s
All checks were successful
Build && Deploy / cargo build (push) Successful in 1m5s
This commit is contained in:
parent
de68e41725
commit
daf1e09176
@ -157,7 +157,6 @@ where
|
||||
|
||||
let thread =
|
||||
spawn_bot_thread(controller.bot.clone(), controller.db.clone(), handler).await?;
|
||||
println!("Starting notificator");
|
||||
let notificator = spawn_notificator_thread(controller.clone()).await?;
|
||||
let notificator = NotificatorThread::Running(Some(notificator));
|
||||
|
||||
@ -235,8 +234,6 @@ pub async fn spawn_notificator_thread(
|
||||
match notifications {
|
||||
Some(n) => {
|
||||
// waiting time to send notification
|
||||
println!("Will send notification after {:?}", n.wait_for());
|
||||
println!("Notifications: {:#?}", n.notifications());
|
||||
tokio::time::sleep(n.wait_for()).await;
|
||||
'n: for n in n.notifications().into_iter() {
|
||||
for user in n.get_users(&c.db).await?.into_iter() {
|
||||
|
||||
@ -625,12 +625,10 @@ impl NotificationTime {
|
||||
delta_minutes,
|
||||
} => {
|
||||
let delta = TimeDelta::minutes((delta_minutes + delta_hours * 60).into());
|
||||
println!("Delta: {delta}");
|
||||
|
||||
let mut estimation = *start_time;
|
||||
// super non-optimal, but fun :)
|
||||
loop {
|
||||
println!("Adding delta to estimation");
|
||||
if estimation < now + Duration::from_secs(1) {
|
||||
estimation += delta;
|
||||
} else {
|
||||
@ -807,7 +805,6 @@ impl BotNotification {
|
||||
// immidate notification if time to do it passed
|
||||
let duration = (next - now).to_std().unwrap_or(Duration::from_secs(1));
|
||||
|
||||
println!("Left time: {duration:?}");
|
||||
// Rounding partitions of seconds
|
||||
Duration::from_secs(duration.as_secs())
|
||||
}
|
||||
@ -890,7 +887,6 @@ impl RunnerConfig {
|
||||
.filter(|f| f.left_time(&start_time, &now) > Duration::from_secs(1))
|
||||
.sorted_by_key(|f| f.left_time(&start_time, &now))
|
||||
.collect::<Vec<_>>();
|
||||
println!("Orederd: {:#?}", ordered);
|
||||
|
||||
let left = match ordered.first() {
|
||||
Some(notification) => notification.left_time(&start_time, &now),
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user