File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
packages/opencode/src/server Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -81,14 +81,13 @@ export namespace Server {
8181 // Entries auto-expire after a short window.
8282 const LastConfigUpdate : Map < string , { scope : "project" | "global" ; sections : string [ ] ; at : number } > = new Map ( )
8383
84+ // Periodically clean up stale entries from LastConfigUpdate
85+ setInterval ( ( ) => {
86+ const now = Date . now ( )
87+
8488 function rememberConfigUpdate ( directory : string , scope : "project" | "global" , sections : string [ ] ) {
8589 LastConfigUpdate . set ( directory , { scope, sections, at : Date . now ( ) } )
86- // best-effort cleanup of stale entries
87- for ( const [ key , value ] of LastConfigUpdate ) {
88- if ( Date . now ( ) - value . at > 60_000 ) LastConfigUpdate . delete ( key )
89- }
9090 }
91-
9291 export const Event = {
9392 Connected : Bus . event ( "server.connected" , z . object ( { } ) ) ,
9493 }
You can’t perform that action at this time.
0 commit comments