skip to Main Content

In plugin we have scheduled task, after install this plugin in shopware in console we get an error:
Error thrown while handling message …ScheduledTaskTask. Sending for retry #3 using 4000 ms delay. Error: "No handler for message "…ScheduledTaskTask"."
It’s cause because workers (which is run by supervisor) do not have the current code after installing the plugin.

There is any way to stop workers and run it with new code right after install plugin?

2

Answers


  1. There is a console command to stop the workers:

    ./bin/console messenger:stop-workers

    Login or Signup to reply.
  2. Workers are killed when activating, deactivating and updating the plugin:
    https://github.com/shopware/core/blob/v6.4.20.1/Framework/MessageQueue/ScheduledTask/Subscriber/PluginLifecycleSubscriber.php#L47

    If you have installed and activated the plugin then the workers should be killed.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search