Hi,

My requirement is to run LSC sync periodically and automatically using a quartz 
scheduler. So we will always have to provide sync and clean task. After the 
initial sync  if all LDAP entries are deleted then when the sync runs next time 
clean task also should run irrespective of whether I have provided sync task or 
not. Otherwise my destination is not in sync with my source.

Regards,
Dinesh Babu.
Pitney Bowes Software
6 Hercules Way, Leavesden Park, Watford, Herts WD25 7GS
Ph: +441923 279123 www.pb.com/software
[email protected]

Every connection is a new opportunity™




Please consider the environment before printing or forwarding this email. If 
you do print this email, please recycle the paper.

This email message may contain confidential, proprietary and/or privileged 
information. It is intended only for the use of the intended recipient(s). If 
you have received it in error, please immediately advise the sender by reply 
email and then delete this email message. Any disclosure, copying, distribution 
or use of the information contained in this email message to or by anyone other 
than the intended recipient is strictly prohibited.


-----Original Message-----
From: Raphaël Ouazana-Sustowski [mailto:[email protected]]
Sent: 10 June 2014 10:10
To: Dinesh Babu
Cc: [email protected]; [email protected]
Subject: RE: [lsc-users] Clean task not getting fired

Hi,

Le 06/06/2014 18:21, Dinesh Babu a écrit :
> Hi Raphaël,
>
> There is no error about non existing source. There is source (which is
> an existing LDAP) and it can find it. But because the source does not
> have any entries ( as I have deleted them ) I would like my
> destination ( which is a Solr instance ) also to be cleaned which is
> not happening as LSC skips clean task when it can't find any source
> bean as explained below
>
>  In SimpleSynchronize.launch(...) method there is for loop
>
> for (Task task: cache.values()) {...}
>
> Inside this for loop there is an if clause for sync
>
> if (!launchTask(task, Task.Mode.sync))
>
> This "launchTask (..)" method will always return false if it can't
> find any source bean and breaks out of the for loop and hence can't
> reach if clause for the clean shown below
>
> if (isCleanTaskAll || cleanTasks.contains(task.getName()))
>
>
> So in effect LSC does not perform a clean task if it can't find any
> entry in the source LDAP.


That's not accurate. In your case you don't need to have a sync task.
So if you don't provide any sync task, the clean task will be launched.

Regards,
Raphaël Ouazana.


________________________________

_______________________________________________________________
Ldap Synchronization Connector (LSC) - http://lsc-project.org

lsc-users mailing list
[email protected]
http://lists.lsc-project.org/listinfo/lsc-users

Reply via email to