[python-ldap] SyncreplConsumer running in parallel with other application

David Gabriel davidgab283 at gmail.com
Tue Jan 12 11:30:31 EST 2016


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.
> Regards
>
> 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 bogus.
>>
>> Ciao, Michael.
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ldap/attachments/20160112/ad388a4e/attachment.html>


More information about the python-ldap mailing list