mirror of
https://gitlab.nic.cz/knot/knot-dns.git
synced 2026-02-03 18:49:28 -05:00
server: log how long final timerDB dump took
This commit is contained in:
parent
8d558bb686
commit
5c9edbdf22
1 changed files with 7 additions and 3 deletions
|
|
@ -1087,11 +1087,15 @@ void server_deinit(server_t *server)
|
|||
bool should_sync = (conf()->cache.db_timer_db_sync == TIMER_DB_SYNC_SHUTDOWN ||
|
||||
conf()->cache.db_timer_db_sync > 0);
|
||||
if (should_sync && server->zone_db != NULL) {
|
||||
log_info("updating persistent timer DB");
|
||||
struct timespec beg = time_now();
|
||||
int ret = zone_timers_write_all(&server->timerdb, server->zone_db);
|
||||
char dur_str[64] = "";
|
||||
duration_to_str(dur_str, &beg);
|
||||
if (ret != KNOT_EOK) {
|
||||
log_error("failed to update persistent timer DB (%s)",
|
||||
knot_strerror(ret));
|
||||
log_error("failed to update persistent timer DB%s (%s)",
|
||||
dur_str, knot_strerror(ret));
|
||||
} else {
|
||||
log_info("updated persistent timer DB%s", dur_str);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue