Questions tagged [sucker-punch]

Sucker Punch is a Ruby asynchronous processing library using Celluloid, heavily influenced by Sidekiq and girl_friday.

Definition:

Sucker Punch is a single-process Ruby asynchronous processing library which uses concurrent-ruby.

Installation Instructions:

gem install sucker_punch

Example Usage:

class ExampleJob
    include SuckerPunch::Job
    def perform(data)
        puts data
    end
end

ExampleJob.perform_async("qwerty")  # perform immediately and asynchronously
ExampleJob.perform_in(30, "qwerty") # perform will be executed 30 seconds later

Important Links:

31 questions
0
votes
1 answer

Using RSpec to test SuckerPunch::Job

I've defined the following SuckerPunch Job: class MyWorker include SuckerPunch::Job def perform(account) @account = account end def params @account end end And I want to test it using RSpec: describe MyWorker do before {…
hjblok
  • 2,936
  • 22
  • 20
1 2
3