let read_index url =
let module C = Configuration in
- if Sys.command ("wget -c -P " ^ C.tmpdir ^ " " ^ url ^ "/\"" ^
+ if Sys.command ("helm_wget " ^ C.tmpdir ^ " " ^ url ^ "/\"" ^
C.indexname ^ "\"") <> 0
then
raise (ErrorGetting url) ;
uris map
;;
+exception PerlGetterNotResponding;;
+
let update () =
let module C = Configuration in
let fd = open_in C.servers_file in
Dbm.opendbm C.uris_dbm [Dbm.Dbm_wronly ; Dbm.Dbm_create] 0o660
in
MapOfStrings.iter (fun uri url -> Dbm.add dbm uri url) urls_of_uris ;
- Dbm.close dbm
+ Dbm.close dbm ;
+ (* Inform also the Perl-getter *)
+ if Sys.command ("wget -O /dev/null http://localhost:8081/update") <> 0
+ then
+ raise PerlGetterNotResponding ;
;;
(* url_of_uri : uri -> url *)
begin
let url = url_of_uri uri in
(*CSC: use -q for quiet mode *)
- if Sys.command ("wget -c -P " ^ dir ^ " \"" ^ url ^"\"") <> 0
+ if Sys.command ("helm_wget " ^ dir ^ " \"" ^ url ^"\"") <> 0
then
raise (ErrorGetting url) ;
end ;