Sha256: e07af90f2d6f4e8523184c8c39eeea8d2f4f201f98f42bdaaaf3e85bfdb9f846

Contents?: true

Size: 394 Bytes

Versions: 15

Compression:

Stored size: 394 Bytes

Contents

# frozen_string_literal: true

module SidekiqPublisher
  module Worker
    def self.included(base)
      base.include(Sidekiq::Worker)
      base.singleton_class.public_send(:alias_method, :sidekiq_client_push, :client_push)
      base.extend(ClassMethods)
    end

    module ClassMethods
      def client_push(item)
        SidekiqPublisher::Job.create_job!(item)
      end
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
sidekiq_publisher-2.0.1 lib/sidekiq_publisher/worker.rb
sidekiq_publisher-2.0.0 lib/sidekiq_publisher/worker.rb
sidekiq_publisher-2.0.0.rc0 lib/sidekiq_publisher/worker.rb
sidekiq_publisher-1.8.0 lib/sidekiq_publisher/worker.rb
sidekiq_publisher-1.8.0.rc0 lib/sidekiq_publisher/worker.rb
sidekiq_publisher-1.7.1 lib/sidekiq_publisher/worker.rb
sidekiq_publisher-1.7.0 lib/sidekiq_publisher/worker.rb
sidekiq_publisher-1.7.0.rc1 lib/sidekiq_publisher/worker.rb
sidekiq_publisher-1.7.0.rc0 lib/sidekiq_publisher/worker.rb
sidekiq_publisher-1.6.4 lib/sidekiq_publisher/worker.rb
sidekiq_publisher-1.6.3 lib/sidekiq_publisher/worker.rb
sidekiq_publisher-1.6.2 lib/sidekiq_publisher/worker.rb
sidekiq_publisher-1.6.1 lib/sidekiq_publisher/worker.rb
sidekiq_publisher-1.6.0 lib/sidekiq_publisher/worker.rb
sidekiq_publisher-1.6.0.pre0 lib/sidekiq_publisher/worker.rb