From 31c54baed8cee3fc8ddd995e3a82c24c27408cbe Mon Sep 17 00:00:00 2001 From: Łukasz Biały Date: Mon, 25 Feb 2019 15:59:04 +0100 Subject: additional target which allows user to shut down background server --- main/src/main/MainModule.scala | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'main/src') diff --git a/main/src/main/MainModule.scala b/main/src/main/MainModule.scala index dbe92cc2..40014169 100644 --- a/main/src/main/MainModule.scala +++ b/main/src/main/MainModule.scala @@ -247,6 +247,14 @@ trait MainModule extends mill.Module{ } } + /** + * Shuts down mill's background server + */ + def shutdown() = mill.T.command { + T.ctx().log.info("Shutting down Mill server...") + System.exit(0) + } + private type VizWorker = (LinkedBlockingQueue[(scala.Seq[_], scala.Seq[_], os.Path)], LinkedBlockingQueue[Result[scala.Seq[PathRef]]]) -- cgit v1.2.3