Need a better way of running plugins immediately

Bug #955899 reported by Björn Tillenius
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Landscape Client
Invalid
Medium
Unassigned

Bug Description

You can specify that a plugin should be run immediately, which means that it's run as soon as it's registered as a plugin. What you usually want, though, is to have to plugin to run as soon as it can, the first time it's run.

For example, if you register a plugin and the client hasn't registered with the server, the plugin won't run. When the client then register with the server, the plugin still won't be run, until the next run_interval. If you say that a plugin is to be immediately, it makes sense to run it immediately after the server registration, when the server tells the client which messages it accepts.

It's possible to achieve today, but it's a bit clunky, you have to do something like this:

  self.call_on_accepted(self.message_type, self.send_message)
  self.registry.broker.call_if_accepted(
      self.message_type, self.send_message)

One solution would be to have call_if_accepted() use call_on_accepted, if the message isn't accepted yet.

Changed in landscape-client:
importance: Undecided → Medium
milestone: none → backlog
Revision history for this message
🤖 Landscape Builder (landscape-builder) wrote :

This bug has not seen any activity in the last 6 months, so it is being automatically closed.

If you are still experiencing this issue, please feel free to re-open.

Landscape Team

Changed in landscape-client:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.