Univention Bugzilla – Attachment 10018 Details for
Bug 49442
Reduce S4-Connector latency - let it wake up when UCS changes are incoming
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
0001-Make-S4-Connector-wake-up-when-changes-are-incoming-.patch
0001-Make-S4-Connector-wake-up-when-changes-are-incoming-.patch (text/plain), 2.20 KB, created by
Arvid Requate
on 2019-05-09 21:29:09 CEST
(
hide
)
Description:
0001-Make-S4-Connector-wake-up-when-changes-are-incoming-.patch
Filename:
MIME Type:
Creator:
Arvid Requate
Created:
2019-05-09 21:29:09 CEST
Size:
2.20 KB
patch
obsolete
>From 894c71e8db4b19e9e946d76a9faa597959122e71 Mon Sep 17 00:00:00 2001 >From: Arvid Requate <requate@univention.de> >Date: Thu, 9 May 2019 20:44:01 +0200 >Subject: [PATCH] Make S4-Connector wake up when changes are incoming from UCS > >--- > services/univention-s4-connector/debian/control | 3 ++- > .../modules/univention/s4connector/s4/main.py | 8 +++++++- > 2 files changed, 9 insertions(+), 2 deletions(-) > >diff --git a/services/univention-s4-connector/debian/control b/services/univention-s4-connector/debian/control >index 935dbe8085..4fa6517067 100644 >--- a/services/univention-s4-connector/debian/control >+++ b/services/univention-s4-connector/debian/control >@@ -17,7 +17,8 @@ Depends: ${misc:Depends}, ${python:Depends}, > python-univention-heimdal (>= 4.0.2-2), > python-univention-directory-manager (>= 13.0.21-28), > python-pyasn1-modules, >- python-pysqlite2 >+ python-pysqlite2, >+ python-inotifyx > Provides: ${python:Provides} > Description: UCS - Modules for connector sychronisation > This package contains the modules that implement the >diff --git a/services/univention-s4-connector/modules/univention/s4connector/s4/main.py b/services/univention-s4-connector/modules/univention/s4connector/s4/main.py >index 78710c6fc3..f961c6da77 100755 >--- a/services/univention-s4-connector/modules/univention/s4connector/s4/main.py >+++ b/services/univention-s4-connector/modules/univention/s4connector/s4/main.py >@@ -44,6 +44,7 @@ import traceback > import univention > import univention.s4connector > import univention.s4connector.s4 >+import inotifyx > > from univention.config_registry import ConfigRegistry > >@@ -199,6 +200,8 @@ def connect(): > > retry_rejected = 0 > connected = True >+ inotify_fd = inotifyx.init() >+ inotifyx.add_watch(inotify_fd, s4.listener_dir, inotifyx.IN_MOVED_TO) > while connected: > print time.ctime() > # Aenderungen pollen >@@ -252,7 +255,10 @@ def connect(): > > print '- sleep %s seconds (%s/%s until resync) -' % (poll_sleep, retry_rejected, baseconfig_retry_rejected) > sys.stdout.flush() >- time.sleep(poll_sleep) >+ events = inotifyx.get_events(inotify_fd, poll_sleep) >+ if events: >+ print '- Inotify reported changes from UCS' >+ os.close(inotify_fd) > s4.close_debug() > > >-- >2.11.0 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 49442
: 10018