Skip to content

Instantly share code, notes, and snippets.

@jortel
Created March 8, 2019 19:20
Show Gist options
  • Save jortel/c08d6a28ee41add88942d683f066bb3b to your computer and use it in GitHub Desktop.
Save jortel/c08d6a28ee41add88942d683f066bb3b to your computer and use it in GitHub Desktop.
https://github.com/jortel/gofer/blob/master/src/gofer/messaging/adapter/model.py#L711
Petty much like the Reader.
Need to configuration and plugin.refresh() done first.
Example assumes queue named pulp.qneeded and the message should probably be the plugin.cfg.messaging.uuid
---
from gofer.messaging import NotFound, Sender
try:
with Sender(url) as sender:
sender.send('pulp.qneeded', 'pulp.agent.12345')
except NotFound:
pass
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment