Created
August 20, 2016 01:15
-
-
Save kenzotakahashi/3947b270016424a634b63f9ac9a893d4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#week3/plactice/app/jobs/pokemon/pokemon_job.rb | |
module Pokemon | |
class PokemonJob < ApplicationJob | |
queue_as :default | |
def perform(*args) | |
puts "ポケモンGO!" | |
end | |
end | |
end | |
#week3/plactice/lib/tasks/pokemon.rake | |
namespace :pokemon do | |
desc 'Say Pokemon!' | |
task hello_world: :environment do | |
# (1..100000).each do | |
(1..10).each do | |
Pokemon::PokemonJob.perform_later | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment