Skip to content
This repository has been archived by the owner on Nov 8, 2024. It is now read-only.

Commit

Permalink
Packet debug
Browse files Browse the repository at this point in the history
  • Loading branch information
augustuswm committed Dec 5, 2023
1 parent 9cdcb91 commit 3baf1a9
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions cio/src/interviews.rs
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,8 @@ pub async fn refresh_interviews(db: &Database, company: &Company) -> Result<()>
cio_company_id: company.id,
};

info!("Handling calendar event {:?} ({:?})", event.id, event.attendees);

for attendee in event.attendees {
// Skip the Interviews calendar.
if attendee.email.ends_with("@group.calendar.google.com") {
Expand Down Expand Up @@ -183,6 +185,7 @@ pub async fn refresh_interviews(db: &Database, company: &Company) -> Result<()>
continue;
} else {
// Just continue, likely the applicant added another email to the event.
info!("Skipping email: {}", attendee.email);
continue;
}
}
Expand Down Expand Up @@ -261,6 +264,8 @@ pub async fn refresh_interviews(db: &Database, company: &Company) -> Result<()>
if !final_email.is_empty() {
interview.interviewers.push(final_email.to_string());
continue;
} else {
info!("Failed to find attendee email in {:?}", attendee);
}
}

Expand All @@ -285,6 +290,7 @@ pub async fn refresh_interviews(db: &Database, company: &Company) -> Result<()>

let name = interview.name.to_string();
if name.is_empty() {
info!("Interview name is empty, skipping record {}", interview.google_event_id);
// Continue early.
continue;
}
Expand All @@ -303,6 +309,10 @@ pub async fn refresh_interviews(db: &Database, company: &Company) -> Result<()>
if interview.interviewers.is_empty() {
// Continue early.
// We only care about interviews where the candidate has interviewers.
info!(
"Interviewers list is empty, skipping record {}",
interview.google_event_id
);
continue;
}
interview.upsert(db).await?;
Expand Down

0 comments on commit 3baf1a9

Please sign in to comment.