LastProjectAccess.js 415 B

123456789101112
  1. /**
  2. * LAST_ACCESS is "owned" by ProjectPersistenceManager, but needs to be accessed
  3. * by the DockerRunner. Which in turn is imported through CompileManager from
  4. * ProjectPersistenceManager. Avoid this cyclic import with an extra module.
  5. */
  6. // projectId -> timestamp mapping.
  7. export const LAST_ACCESS = new Map()
  8. export function getLastProjectAccessTime(projectId) {
  9. return LAST_ACCESS.get(projectId) ?? 0
  10. }