-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathProgram.fs
28 lines (21 loc) · 941 Bytes
/
Program.fs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
// Learn more about F# at http://fsharp.org
module GrafanaTest
open Configuration
open System
open System.Threading
open Ethermine.Miner
open Ethermine.Worker
[<EntryPoint>]
let rec main args =
printfn "%s" (DateTime.Now.ToShortDateString() + " " + DateTime.Now.ToShortTimeString())
createAndSaveTimeSeriesForMiner minerhash
|> Async.RunSynchronously
|> fun x -> (printfn "Body:%s\r\mCode:%s\r\nSucces:%s\r\n" x.Result.Body (x.Result.StatusCode.ToString()) (x.Result.Success.ToString()))
createAndSaveTimeSeriesForWorkers minerhash
|> Async.RunSynchronously
|> Seq.iter(fun x -> (printfn "Body:%s\r\mCode:%s\r\nSucces:%s\r\n" x.Result.Body (x.Result.StatusCode.ToString()) (x.Result.Success.ToString())))
printfn "run done"
printfn "%s" (DateTime.Now.ToShortDateString() + " " + DateTime.Now.ToShortTimeString())
Thread.Sleep (60000 * 10)
main ([||]) |> ignore
0