Skip to Content
0
Former Member
May 10, 2018 at 11:21 AM

How stop running groovy script event listener?

245 Views

I played with adding Groovy event listener to SyncFinishedEvent. This event fires when product catalog is being fully synchronized or when you have synchronized a single product from HMC/Backoffice.

I have created Script, saved it to DB, created instance of listener, registered it by such command

 scriptingEventService.registerScriptingEventListener('model://myEventListenerScript')

It worked as it should, it catched event as well

Than I unregistered event by such command

 scriptingEventService.unregisterScriptingEventListener('model://myEventListenerScript')

It stopped work. Than after system update and after actions of other developer on server I found that Script event listener is running.

  1. I unregistered it as I did it before

  2. I removed Script from DB (from backoffice)

  3. I checked that scriptingEventService.getRegisteredWrappers() returned empty result

  4. I checked that in this result my custom event listener is also not present eventService.eventListeners

After all of this it is still running.

Question: 1. Where my groovy event listener can remain? 2. Or how to stop it?

Thanks in advance