Sha256: a10406ecd997fa5a98a7381255750aec87a2545d28ade4c319f0ba70b041a259
Contents?: true
Size: 680 Bytes
Versions: 16
Compression:
Stored size: 680 Bytes
Contents
module BusinessFlow # Fire ActiveSupport events for every step that's run and on errors class InstrumentedExecutor < DefaultStepExecutor def call name = flow_event_name payload = { flow: flow } ActiveSupport::Notifications.instrument(name, payload) do super end notify_errors(name, payload) end protected def notify_errors(name, payload) return unless flow.errors? ActiveSupport::Notifications.publish(name + '.error', payload) end def flow_name @flow_name ||= flow.class.instrumentation_name end def flow_event_name @flow_event_name ||= flow.class.event_name end end end
Version data entries
16 entries across 16 versions & 1 rubygems