-
Notifications
You must be signed in to change notification settings - Fork 1k
Drop other idle servers on exit #8610
Copy link
Copy link
Closed
Labels
Description
steps
- start an sbt session in one directory using sbt 2.x (defaults to sbtn), and
exit - start another sbt session in another directory using sbt 2.x and
exit - etc
problem
Each session leaves behind an idle server for 7 days.
sbt/main/src/main/scala/sbt/Defaults.scala
Line 399 in 2380ab8
| serverIdleTimeout := Some(new FiniteDuration(7, TimeUnit.DAYS)), |
expectation
- When sbt server starts up a port file
active.jsonis created. Create another file1234.jsonunder$HOME/Library/Caches/sbt/v2/proc(the disk cache location for the OS + /proc) with the same content, where1234is the process id. - Upon
exitsenddropIfIdlemessage to other servers. Remove2345.jsonif it's unreachable. - The servers that received
dropIfIdlemessage should shut itself down, if it's been idle for 600 seconds or more. - When the port file
active.jsonis deleted, also delete1234.json. - This should reduce the idle server to one.
Reactions are currently unavailable