mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-23 09:09:36 +02:00
* [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
13 lines
415 B
JavaScript
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
|
|
}
|