#195 protonmsg hub plugin
Merged by mikem. Opened by mikeb.
mikeb/koji protonmsg  into  master

Download 195.patch

This plugin sends messages to a broker about events in the hub
using the proton library. This library supports the AMQP 1.0
protocol and is compatible with a wide variety of message
brokers. It queues all messages until the postCommit callback,
avoiding race conditions between message reception and database
transaction commit.

Style suggestion: make this _prep_tag_msg, since it doesn't have its own @callback() decorator.

Looks good here.

Tests pass locally.

I left one non-blocking stylistic comment about _prep_tag_msg.

rebased

Took your advice on _prep_tag_msg, thanks for the feedback @ralph !

A couple minor things:

  • 'import os' is unused
  • connect_task and timeout_task should probably be defined in __init__

Also, do we really need to read the config file every time we send messages? Everywhere else in koji, we read config at startup.

Thanks for including a unit test!

rebased

@mikem Removed unused import. Defined connect_task and timeout_task in init(). Defined a CONFIG global, and parse the config into it once per-process.

Thanks for the review!

The plugin code looks good to my eyes.

Changes look good, thanks!

Pull-Request has been merged by mikem

Metadata