[python-ldap] Need to detect if syncrepl refresh phase is completed
Petr Spacek
pspacek at redhat.com
Thu Sep 25 16:41:47 CEST 2014
On 25.9.2014 16:27, Michael Ströder wrote:
> Petr Spacek wrote:
>> On 10.9.2014 14:46, Michael Ströder wrote:
>>> Martin Basti wrote:
>>>> I need to detect if syncrepl refresh phase is completed during
>>>> syncrepl_poll (in refresh&persist mode), is there any way how to do it?
>>>>
>>>> I found a patch
>>>> https://github.com/spacekpe/python-ldap/commit/8b4f935a97759c692637fb9a81e7d353ace27f53
>>>>
>>>> is it the right way?
>>>
>>> Petr sent his patches to the mailing list in July. Currently they are still
>>> pending for review. I might have a chance to review and commit them during the
>>> next two weeks.
>>
>> I'm very sorry for bothering you. I would like to push latest version of
>> python-ldap package to Fedora so I would like to know if the patch can be
>> included or not. (Obviously Fedora don't want to provide non-standard API.)
>>
>> The patch or some other alternative for end-of-refresh-phase-detection is
>> required for further development in the FreeIPA project...
>
> Personally I generally dislike callbacks. A better approach should IMO specify
> just a generic handler method an application can override in a sub-class.
>
> Can you develop a patch like this?
The patch adds method SyncreplConsumer.syncrepl_refreshdone() and this method
should be overridden in sub-class in the same way as existing method
syncrepl_entry() and the like.
I agree that variable name 'callback' is not the best but it actually is not a
callback, it works in the same way as similar methods in SyncreplConsumer class.
I hope I didn't miss something obvious, please correct me if I'm wrong.
--
Petr Spacek @ Red Hat
More information about the python-ldap
mailing list