Files
overleaf-cep/services/clsi/app/js/LastProjectAccess.js
Jakob Ackermann a9c413857a [clsi] avoid destroying containers of recently accessed projects (#32186)
* [clsi] avoid destroying containers of recently accessed projects

Co-authored-by: Anna Claire Fields <anna.fields@overleaf.com>

* [clsi] gracefully handle missing access time during container cleanup

* [clsi] fix cyclic import

---------

Co-authored-by: Anna Claire Fields <anna.fields@overleaf.com>
GitOrigin-RevId: 8195b6fccbe26d2fd673d38356af5d44cf4042a3
2026-03-18 09:07:01 +00:00

13 lines
415 B
JavaScript

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