Browse Source

improve debug output

master
Astro 2 years ago
parent
commit
54dc6db900
  1. 4
      src/main.rs

4
src/main.rs

@ -128,9 +128,9 @@ impl Resources {
}
let mut res = req.send()?;
println!("[{}] HTTP {}", id, res.status());
if res.status() != 200 {
let msg = format!("HTTP {}", res.status());
println!("{} {}", res.status(), cal_opts.url);
diesel::update(calendars)
.filter(schema::calendars::dsl::id.eq(id.clone()))
.set((schema::calendars::dsl::last_success.eq(Utc::now().naive_utc()),
@ -181,7 +181,7 @@ impl Resources {
}
drop(res);
println!("{} events {}", events.len(), cal_opts.url);
println!("[{}] {} events", id, events.len());
diesel::delete(schema::events::dsl::events)
.filter(schema::events::dsl::calendar.eq(id))
.execute(&db)?;

Loading…
Cancel
Save