-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
91 additions
and
58 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
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,3 +1,21 @@ | ||
open Import | ||
open Brr | ||
|
||
include Db.Worker_api.Start_client (struct | ||
let url = "./db_worker.bc.js" | ||
end) | ||
|
||
let servers_status = | ||
let var = Lwd.var ("", Db.Sync.initial_report) in | ||
let _ = | ||
listen Servers_status_update ~f:(fun (id, report) -> | ||
Console.log | ||
[ Format.asprintf "Server %s: %a" id Db.Sync.pp_report report ]; | ||
Lwd.set var (id, report)) | ||
in | ||
var | ||
|
||
let create_view v = | ||
let var = Lwd.var None in | ||
Fut.await (query (Create_view v)) (fun v -> Lwd.set var (Some v)); | ||
Lwd.get var |
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