fedora-infra/fedmsg — pull request #158 by ralphbean (2013-07-29 02:17:10+00:00)
Title: Feature/fedmsg trigger cmd

Add a new command, ``fedmsg-trigger`` that will run a given command whenever certain messages arrive.

The JSON of fedmsg messages are fed to the given command over stdin.

For instance, ``$ fedmsg-trigger --command md5sum`` will act on every message received. Each new message will be piped into a new md5sum process, the output of which will be printed to the terminal.

We can use this for future mirror-manager stuff. Step 1) we write a script that wraps rsync. Step 2) Tier-1 mirrors run ``fedmsg-trigger --command fedora-rsync-wrapper-script.sh --topic org.fedoraproject.prod.compose.rawhide.complete`` which will make them run rsync only when we're done with each compose of the rawhide branch.