Lines 44-49
import traceback
|
Link Here
|
---|
|
44 |
import univention |
44 |
import univention |
45 |
import univention.s4connector |
45 |
import univention.s4connector |
46 |
import univention.s4connector.s4 |
46 |
import univention.s4connector.s4 |
|
|
47 |
import inotifyx |
47 |
|
48 |
|
48 |
from univention.config_registry import ConfigRegistry |
49 |
from univention.config_registry import ConfigRegistry |
49 |
|
50 |
|
Lines 199-204
def connect():
|
Link Here
|
---|
|
199 |
|
200 |
|
200 |
retry_rejected = 0 |
201 |
retry_rejected = 0 |
201 |
connected = True |
202 |
connected = True |
|
|
203 |
inotify_fd = inotifyx.init() |
204 |
inotifyx.add_watch(inotify_fd, s4.listener_dir, inotifyx.IN_MOVED_TO) |
202 |
while connected: |
205 |
while connected: |
203 |
print time.ctime() |
206 |
print time.ctime() |
204 |
# Aenderungen pollen |
207 |
# Aenderungen pollen |
Lines 252-258
def connect():
|
Link Here
|
---|
|
252 |
|
255 |
|
253 |
print '- sleep %s seconds (%s/%s until resync) -' % (poll_sleep, retry_rejected, baseconfig_retry_rejected) |
256 |
print '- sleep %s seconds (%s/%s until resync) -' % (poll_sleep, retry_rejected, baseconfig_retry_rejected) |
254 |
sys.stdout.flush() |
257 |
sys.stdout.flush() |
255 |
time.sleep(poll_sleep) |
258 |
events = inotifyx.get_events(inotify_fd, poll_sleep) |
|
|
259 |
if events: |
260 |
print '- Inotify reported changes from UCS' |
261 |
os.close(inotify_fd) |
256 |
s4.close_debug() |
262 |
s4.close_debug() |
257 |
|
263 |
|
258 |
|
264 |
|
259 |
- |
|
|