projects
/
citadel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
826a38d
)
Log a warning message if housekeeping has not run in more than 5 minutes
author
Art Cancro
<ajc@citadel.org>
Wed, 12 Jul 2017 16:31:42 +0000
(12:31 -0400)
committer
Art Cancro
<ajc@citadel.org>
Wed, 12 Jul 2017 16:31:42 +0000
(12:31 -0400)
citadel/housekeeping.c
patch
|
blob
|
history
diff --git
a/citadel/housekeeping.c
b/citadel/housekeeping.c
index b685c701af4d1f13d99bd716fd156eeb06eea183..dae17c3eab220770de5ad614244704063adb3f7d 100644
(file)
--- a/
citadel/housekeeping.c
+++ b/
citadel/housekeeping.c
@@
-98,7
+98,14
@@
void do_housekeeping(void) {
}
end_critical_section(S_HOUSEKEEPING);
}
end_critical_section(S_HOUSEKEEPING);
+ now = time(NULL);
if (do_housekeeping_now == 0) {
if (do_housekeeping_now == 0) {
+ if ( (now - last_timer) > (time_t)300 ) {
+ syslog(LOG_WARNING,
+ "housekeeping: WARNING: housekeeping loop has not run for %ld minutes. Is something stuck?",
+ ((now - last_timer) / 60)
+ );
+ }
return;
}
return;
}
@@
-107,7
+114,6
@@
void do_housekeeping(void) {
* loop. Everything below this point is real work.
*/
* loop. Everything below this point is real work.
*/
- now = time(NULL);
if ( (now - last_timer) > (time_t)60 ) {
do_perminute_housekeeping_now = 1;
last_timer = time(NULL);
if ( (now - last_timer) > (time_t)60 ) {
do_perminute_housekeeping_now = 1;
last_timer = time(NULL);