Sha256: a81eff98c6f43de8fb0b8de8a853699ffd2f60ef29dda468b3af56a4e6166988

Contents?: true

Size: 437 Bytes

Versions: 12

Compression:

Stored size: 437 Bytes

Contents

# frozen_string_literal: true

module SidekiqPublisher
  module Worker
    def self.included(base)
      base.include(Sidekiq::Worker)
      base.extend(ClassMethods)
    end

    module ClassMethods
      def client_push(item)
        SidekiqPublisher::Job.create!(
          job_class: item["class"].to_s,
          args: item["args"],
          run_at: item["at"],
          queue: item["queue"]
        )
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
sidekiq_publisher-1.3.0 lib/sidekiq_publisher/worker.rb
sidekiq_publisher-1.2.0 lib/sidekiq_publisher/worker.rb
sidekiq_publisher-1.1.0 lib/sidekiq_publisher/worker.rb
sidekiq_publisher-1.0.0 lib/sidekiq_publisher/worker.rb
sidekiq_publisher-0.3.3 lib/sidekiq_publisher/worker.rb
sidekiq_publisher-0.3.2 lib/sidekiq_publisher/worker.rb
sidekiq_publisher-0.3.1 lib/sidekiq_publisher/worker.rb
sidekiq_publisher-0.3.0 lib/sidekiq_publisher/worker.rb
sidekiq_publisher-0.2.1 lib/sidekiq_publisher/worker.rb
sidekiq_publisher-0.2.0 lib/sidekiq_publisher/worker.rb
sidekiq_publisher-0.1.0 lib/sidekiq_publisher/worker.rb
sidekiq_publisher-0.1.0.rc0 lib/sidekiq_publisher/worker.rb