Skip to content

update Event -> Job method signature (event_id, event_type) #273

@bedrock-adam

Description

@bedrock-adam
class EventCreatedJob
  include Sidekiq::Job

  def self.perform_async(event_id, event_type)
    can_handle?(event_type: event_type) ? super : nil
  end

  def perform(event_id, event_type)
  end
end
module OutboxerIntegration
  class TestStartedJob
    include Sidekiq::Job

    def perform(event_id, event_type)
      test_started_event = event_type.safe_constantize.find(event_id)

      TestCompletedEvent.create!(body: { "test_id" => test_started_event.body["test_id"] })
    end
  end
end

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions