This Rails application is used to serve as a demo for setting up Sucker Punch.
The web UI can be found by running the local server (rails s
) and browsing
to:
http://localhost:3000/sucker_punch
Two types of jobs can be enqueued via Rails controllers: FakeJob
and
LogJob
.
class FakeJob
include SuckerPunch::Job
def perform
sleep 2
true
end
end
class LogJob
include SuckerPunch::Job
def perform
sleep 1
true
end
end
To enqueue them, browse to:
http://localhost:3000/jobs/fake?num=100
The query string num
being the number of jobs of that type you'd like to
enqueue.
Likewise, to enqueue a LogJob
, browse to:
http://localhost:3000/jobs/fake?num=100
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request