async function getLatestStoredSchemaTs()

in functions/schemaLoader.js [34:48]


async function getLatestStoredSchemaTs() {
  try {
    const db = admin.firestore();
    const latestSchema = await db.collection('glean_schemas').doc('latest').get();
    if (!latestSchema.exists) {
      console.log('Latest glean schema doc not found in Firestore');
      return null;
    } else {
      return latestSchema.data().deployTimestamp;
    }
  } catch (error) {
    console.error(error);
    return null;
  }
}