fix token expiration warning
@@ -79,7 +79,7 @@ pub async fn refresh_recorded_meetings() {
let gsuite_customer = env::var("GADMIN_ACCOUNT_ID").unwrap();
let token = get_gsuite_token("").await;
- let gsuite = GSuite::new(&gsuite_customer, GSUITE_DOMAIN, token.clone());
+ let mut gsuite = GSuite::new(&gsuite_customer, GSUITE_DOMAIN, token.clone());
let revai = RevAI::new_from_env();
// Get the list of our calendars.
@@ -88,6 +88,8 @@ pub async fn refresh_recorded_meetings() {
// Iterate over the calendars.
for calendar in calendars {
if calendar.id.ends_with(GSUITE_DOMAIN) {
+ gsuite = GSuite::new(&gsuite_customer, GSUITE_DOMAIN, get_gsuite_token("").await);
+
// Let's get all the events on this calendar and try and see if they
// have a meeting recorded.
println!("Getting events for {}", calendar.id);
