|
|
d6181b |
From 6b068dec9ac5b2f22a9c20b5554a6e45af6dc8bb Mon Sep 17 00:00:00 2001
|
|
|
d6181b |
From: Jakub Hrozek <jhrozek@redhat.com>
|
|
|
d6181b |
Date: Wed, 19 Jun 2019 22:03:16 +0200
|
|
|
d6181b |
Subject: [PATCH 37/48] BE: Schedule the refresh interval from the finish time
|
|
|
d6181b |
of the last run
|
|
|
d6181b |
|
|
|
d6181b |
Related: https://pagure.io/SSSD/sssd/issue/4012
|
|
|
d6181b |
|
|
|
d6181b |
Changes scheduling the periodical task so that the next run is started
|
|
|
d6181b |
relative to the previous run finish time, not start time to protect
|
|
|
d6181b |
against cases where the refresh would take too long and run practically
|
|
|
d6181b |
all the time.
|
|
|
d6181b |
|
|
|
d6181b |
Reviewed-by: Sumit Bose <sbose@redhat.com>
|
|
|
d6181b |
---
|
|
|
d6181b |
src/providers/be_refresh.c | 2 +-
|
|
|
d6181b |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
d6181b |
|
|
|
d6181b |
diff --git a/src/providers/be_refresh.c b/src/providers/be_refresh.c
|
|
|
d6181b |
index 50b023c3d..a9d4295ec 100644
|
|
|
d6181b |
--- a/src/providers/be_refresh.c
|
|
|
d6181b |
+++ b/src/providers/be_refresh.c
|
|
|
d6181b |
@@ -157,7 +157,7 @@ errno_t be_refresh_ctx_init(struct be_ctx *be_ctx,
|
|
|
d6181b |
if (refresh_interval > 0) {
|
|
|
d6181b |
ret = be_ptask_create(be_ctx, be_ctx, refresh_interval, 30, 5, 0,
|
|
|
d6181b |
refresh_interval, BE_PTASK_OFFLINE_SKIP,
|
|
|
d6181b |
- BE_PTASK_SCHEDULE_FROM_LAST,
|
|
|
d6181b |
+ BE_PTASK_SCHEDULE_FROM_NOW,
|
|
|
d6181b |
0,
|
|
|
d6181b |
be_refresh_send, be_refresh_recv,
|
|
|
d6181b |
ctx, "Refresh Records", NULL);
|
|
|
d6181b |
--
|
|
|
d6181b |
2.20.1
|
|
|
d6181b |
|