This directory has crons that extract data from Notion and save that data to blob storage in val.town. Blob storage functions like a cache.
Each /demo is a composite of many Notion calls. This cron hit Notion every minute to rebuild the /demo and store the results. That way, when a user hits the /demo, Glancer hits blob storage to build it, rather than query Notion.
Every /demo has an interval script that runs every second to poll the /cobrowse endpoint to see whether or not cobrowsing has been enabled for that demo. If it's enabled, the cobrowse button is live and blue. If cobrowsing is disabled, the user sees a call-to-action to contact Glance.
Hitting Notion every second would put excessive load on Notion and sometimes Notion is under load from other users at peak times. With this caching strategy, we don't have to hit Notion to check the status of cobrowing, because we hit the cache instead.
The cache is updated every minute by the cron in this directory.