Commit 61a6c9b2 authored by Stephane Glondu's avatar Stephane Glondu Committed by Stéphane Glondu

Start data policy loop after config parsing

parent 12dffa36
......@@ -125,3 +125,4 @@ let () = Web_config.source_file := source_file
let () = Web_config.spool_dir := spool_dir
let () = Web_config.default_group := default_group
let () = Web_config.site_auth_config := List.rev !auth_instances
let () = Lwt.async Web_site.data_policy_loop
......@@ -2448,13 +2448,11 @@ let process_election_for_data_policy (action, uuid, next_t, name, contact) =
) else return_unit
)
let () =
let rec data_policy_loop () =
let open Ocsigen_messages in
let rec loop () =
let () = console (fun () -> "Data policy process started") in
let%lwt elections = get_next_actions () in
let%lwt () = Lwt_list.iter_s process_election_for_data_policy elections in
let () = console (fun () -> "Data policy process completed") in
let%lwt () = Lwt_unix.sleep 3600. in
loop ()
in Lwt.async loop
let () = accesslog "Data policy process started" in
let%lwt elections = get_next_actions () in
let%lwt () = Lwt_list.iter_s process_election_for_data_policy elections in
let () = accesslog "Data policy process completed" in
let%lwt () = Lwt_unix.sleep 3600. in
data_policy_loop ()
(* empty interface *)
val data_policy_loop : unit -> 'a Lwt.t
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment