mirror of
https://github.com/mperham/sidekiq.git
synced 2022-11-09 13:52:34 -05:00
15 lines
495 B
Ruby
15 lines
495 B
Ruby
# Add your own tasks in files placed in lib/tasks ending in .rake,
|
|
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
|
|
|
|
require_relative "config/application"
|
|
|
|
Rails.application.load_tasks
|
|
|
|
task seed_jobs: :environment do
|
|
# see classes defined in config/initializers/sidekiq.rb
|
|
[FooJob, BarJob, StoreCardJob, OrderJunkJob, SpamUserJob, FastJob, SlowJob].each do |kls|
|
|
(kls.name.size * 10).times do
|
|
kls.perform_in(rand * 300)
|
|
end
|
|
end
|
|
end
|