-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Neo4j server management - first draft
- Loading branch information
Showing
4 changed files
with
41 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
module Neo4j | ||
|
||
open System.Diagnostics | ||
|
||
type Neo4jState = | ||
| Starting | ||
| Started of int | ||
| Stopping | ||
| Stopped | ||
|
||
type Neo4j = { | ||
Name : string | ||
State : Neo4jState | ||
} | ||
|
||
let Create name = | ||
{ Name = name; State = Stopped } | ||
|
||
let start (instance : Neo4j) = | ||
printfn "Starting" | ||
let pi = new ProcessStartInfo("""..\..\..\..\paket-files\neo4j.com\neo4j-community-3.0.1\bin\neo4j.bat""", "console") | ||
let process = Process.Start(pi) | ||
{ instance with State = Started(process.Id) } | ||
|
||
let stop (instance : Neo4j) = | ||
match instance.State with | ||
| Started id -> printf "Stopping" | ||
let process = Process.GetProcessById(id) | ||
process.CloseMainWindow() | ||
{ instance with State = Stopped } | ||
| _ -> printf "Error" | ||
instance |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<FSharpLintSettings xmlns="https://github.com/fsprojects/FSharpLint/blob/master/ConfigurationSchema.xsd"> | ||
<IgnoreFiles Update="Overwrite"><![CDATA[assemblyinfo.* | ||
]]></IgnoreFiles> | ||
<IgnoreFiles Update="Overwrite"><![CDATA[assemblyinfo.*]]></IgnoreFiles> | ||
<Analysers /> | ||
</FSharpLintSettings> |