[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Sks-devel] On-demand SKS Statistics Generation?
From: |
Peter Pramberger |
Subject: |
Re: [Sks-devel] On-demand SKS Statistics Generation? |
Date: |
Thu, 02 Jul 2009 19:48:54 +0200 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; de-AT; rv:1.8.1.21) Gecko/20090403 SeaMonkey/1.1.16 |
Jason schrieb am 02.07.2009 00:51:
> It should be. Look at sync_db_on_sig() in dbserver.ml, add
> calculate_stats_page(). The code just below it seems to catch SIGUSR1.
We shouldn't mix this expensive operation with the database sync, but -USR2 is
still available for use; patch attached (applies to HEAD).
However the assignment of the signal handler still gives an error, can someone
with more OCaml insight help?
let () = Sys.set_signal Sys.sigusr2
(Sys.Signal_handle (fun _ -> calculate_stats_page ()))
File "dbserver.ml", line 629, characters 32-55:
Error: This expression has type 'a list
but an expression was expected of type unit
Br,
Peter
diff -up sks-1.1.0/common.ml.orig sks-1.1.0/common.ml
--- sks-1.1.0/common.ml.orig 2009-07-02 16:48:40.000000000 +0200
+++ sks-1.1.0/common.ml 2009-07-02 16:53:43.000000000 +0200
@@ -131,7 +131,6 @@
let () = Sys.set_signal Sys.sigterm (Sys.Signal_handle handle_interrupt)
let () = Sys.set_signal Sys.sigint (Sys.Signal_handle handle_interrupt)
let () = Sys.set_signal Sys.sigpipe Sys.Signal_ignore
-let () = Sys.set_signal Sys.sigusr2 Sys.Signal_ignore
let () = Sys.set_signal Sys.sighup
(Sys.Signal_handle (fun _ -> reopen_logfile ()))
diff -up sks-1.1.0/dbserver.ml.orig sks-1.1.0/dbserver.ml
--- sks-1.1.0/dbserver.ml.orig 2009-07-02 16:48:40.000000000 +0200
+++ sks-1.1.0/dbserver.ml 2009-07-02 16:49:08.000000000 +0200
@@ -625,6 +625,9 @@
let () = Sys.set_signal Sys.sigusr1
(Sys.Signal_handle (fun _ -> sync_db_on_sig ()))
+ let () = Sys.set_signal Sys.sigusr2
+ (Sys.Signal_handle (fun _ -> calculate_stats_page ()))
+
(***********************************************************************)
let run () =
diff -up sks-1.1.0/reconserver.ml.orig sks-1.1.0/reconserver.ml
--- sks-1.1.0/reconserver.ml.orig 2009-07-02 16:48:40.000000000 +0200
+++ sks-1.1.0/reconserver.ml 2009-07-02 16:52:47.000000000 +0200
@@ -313,6 +313,7 @@
(***************************************************************)
let () = Sys.set_signal Sys.sigusr1 Sys.Signal_ignore
+ let () = Sys.set_signal Sys.sigusr2 Sys.Signal_ignore
(***********************************************************************)
- [Sks-devel] On-demand SKS Statistics Generation?, John Marshall, 2009/07/01
- Re: [Sks-devel] On-demand SKS Statistics Generation?, Jason, 2009/07/01
- Re: [Sks-devel] On-demand SKS Statistics Generation?, John Marshall, 2009/07/02
- Re: [Sks-devel] On-demand SKS Statistics Generation?,
Peter Pramberger <=
- Re: [Sks-devel] On-demand SKS Statistics Generation?, Peter Pramberger, 2009/07/02
- Re: [Sks-devel] On-demand SKS Statistics Generation?, Kim Minh Kaplan, 2009/07/03
- Re: [Sks-devel] On-demand SKS Statistics Generation?, Dinko Korunic, 2009/07/03
- Re: [Sks-devel] On-demand SKS Statistics Generation?, Kim Minh Kaplan, 2009/07/03
- Re: [Sks-devel] On-demand SKS Statistics Generation?, Dinko Korunic, 2009/07/03
- Re: [Sks-devel] On-demand SKS Statistics Generation?, Kim Minh Kaplan, 2009/07/04