2018-06-21 14:14:54 -04:00
|
|
|
# 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.
|
2012-01-23 17:05:03 -05:00
|
|
|
|
2022-06-05 10:44:52 -04:00
|
|
|
require_relative "config/application"
|
2018-06-21 14:14:54 -04:00
|
|
|
|
|
|
|
Rails.application.load_tasks
|
2022-07-28 15:21:42 -04:00
|
|
|
|
|
|
|
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
|