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

David Gabriel davidgab283 at gmail.com
Mon Jan 18 10:07:07 EST 2016


Dears,

Let me add one more detail: When I add these two lines to check whether my
modules are monkey_patched or not I get *False* as a result.
I think it is strange to get this result since I patched my modules at the
beginning using: eventlet.monkey_patch() as detailed here
<http://eventlet.net/doc/patching.html#import-green>.

print "*****is_monkey_patched(ldap.syncrepl) : %s*****" %
eventlet.patcher.is_monkey_patched('ldap.syncrepl')
print "*****is_monkey_patched(ldap.ldapobject) : %s*****" %
eventlet.patcher.is_monkey_patched('ldap.ldapobject')


Please advise me how to fix this issue.
Kind regards.

2016-01-15 10:16 GMT+01:00 David Gabriel <davidgab283 at gmail.com>:

> Dears
>
> 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.
> Best regards
>
> 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.
>>> 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/20160118/a1f9aa0d/attachment-0001.html>


More information about the python-ldap mailing list