Переглянути джерело

Play with online notification timing again

Grant Limberg 3 роки тому
батько
коміт
ff8da9d246
2 змінених файлів з 6 додано та 1 видалено
  1. 1 1
      controller/PostgreSQL.cpp
  2. 5 0
      zeroidc/src/lib.rs

+ 1 - 1
controller/PostgreSQL.cpp

@@ -1711,7 +1711,7 @@ void PostgreSQL::onlineNotification_Redis()
 
 		fprintf(stderr, "onlineNotification ran in %llu ms\n", total);
 
-		std::this_thread::sleep_for(std::chrono::seconds(1));
+		std::this_thread::sleep_for(std::chrono::seconds(5));
 	}
 }
 

+ 5 - 0
zeroidc/src/lib.rs

@@ -288,6 +288,7 @@ impl ZeroIDC {
                                                                     t.claims().registered.clone();
                                                                 match claims.expiration {
                                                                     Some(exp) => {
+                                                                        println!("exp: {}", exp);
                                                                         (*inner_local
                                                                             .lock()
                                                                             .unwrap())
@@ -297,6 +298,8 @@ impl ZeroIDC {
                                                                         panic!("expiration is None.  This shouldn't happen")
                                                                     }
                                                                 }
+                                                            } else {
+                                                                panic!("error parsing claims");
                                                             }
 
                                                             (*inner_local.lock().unwrap())
@@ -592,6 +595,8 @@ impl ZeroIDC {
                                                 panic!("expiration is None.  This shouldn't happen");
                                             }
                                         }
+                                    } else {
+                                        panic!("Failed to parse token");
                                     }
 
                                     i.access_token = Some(tok.access_token().clone());