candlepin/candlepin — pull request #719 by dgoodwin (2014-09-12 16:20:15+00:00)
Title: Dgoodwin/events on success

Send events on request or job success only. This should prevent situations where we confuse gutterball should there be any case where we dispatch an event, and the request later fails somehow on commit.

Uses either the guice RequestScope, or a custom PinsetterScope, to ensure that only one instance of EventSink is passed into application code for that request/job. EventSink holds onto the events to be dispatched, which happens in the EventFilter for requests, and the KingpinJob parent class for jobs.