[python-ldap] SyncreplConsumer running in parallel with other application
davidgab283 at gmail.com
Fri Jan 15 04:16:22 EST 2016
Please do you have any idea how to define the syncrepl program in such way
to enable the use of eventlet without getting the blocking behavior.
Please let me know whether there is a fix for this issue or not.
Really I am blocked at this step for days !!
Thanks in advance.
2016-01-12 17:30 GMT+01:00 David Gabriel <davidgab283 at gmail.com>:
> Please let me add one detail.
> When I add this instruction: eventlet.sleep(5) after this line: print
> 'Detected', change_type, 'of entry:', dn (or this one print 'Detected
> deletion of entry:', self.__data[uuid]['dn']) the other threads (evt2 and
> evt3) are executed as well for some time.
> After few seconds the program is blocked an other time in evt1 untill a
> new update is triggered from the ldap data base.
> Please tell me how shall I fix this issue.
> Thanks in advance.
> 2016-01-12 1:27 GMT-08:00 David Gabriel <davidgab283 at gmail.com>:
>> Dear Michael and all
>> Thank you very much for your help ...
>> Kindy find attached my source file.
>> I replaced all tabs and I fixed the bugs related to this modification.
>> Please note the presence of 3 threads including the syncrepl one.
>> When I disable the creation of the syncrepl thread (comment the evt1
>> lines) the program is alternating the execution of evt3 and evt2. However
>> when I enable it the program is executing only the syncrepl thread and not
>> the 3 threads.
>> Please help me to fix this issue.
>> Thanks in advance.
>> 2016-01-11 5:51 GMT-08:00 Michael Ströder <michael at stroeder.com>:
>>> Michael Ströder wrote:
>>> > David Gabriel wrote:
>>> >> Thanks Michael.
>>> >> Kindly find attached my source code.
>>> > This results in:
>>> > python -tt tmp/syncrepl3.py 'ldapi://dc=stroeder,dc=de'
>>> > File "tmp/syncrepl3.py", line 58
>>> > previous_attributes = dict()
>>> > ^
>>> > TabError: inconsistent use of tabs and spaces in indentation
>>> > Don't use tabs (see PEP-8).
>>> And opening LDAP connection in the while-loop (line 138) looks also
>>> Ciao, Michael.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the python-ldap