Skip to content

Commit

Permalink
Merge branch 'development'
Browse files Browse the repository at this point in the history
  • Loading branch information
nikukyugamer committed Jun 23, 2018
2 parents 015b8fa + e7b7fda commit c463d62
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion config/deploy/production.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
set :branch, :master
set :deploy_to, ENV["DEPLOY_DIR_FOR_PRODUCTION"]
set :rails_env, 'production'
server ENV["DEPLOY_SERVER"], user: ENV["DEPLOY_USER_FOR_PRODUCTION"], roles: %w{web app db} # wheneverは無効化
server ENV["DEPLOY_SERVER"], user: ENV["DEPLOY_USER_FOR_PRODUCTION"], roles: %w{web app db batch}

set :ssh_options, {
port: ENV["DEPLOY_SERVER_PORT"],
Expand Down
3 changes: 2 additions & 1 deletion config/environments/development.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
# Enable/disable caching. By default caching is disabled.
# Run rails dev:cache to toggle caching.
if Rails.root.join('tmp', 'caching-dev.txt').exist?
config.action_controller.perform_caching = true
# config.action_controller.perform_caching = true
config.action_controller.perform_caching = false

config.cache_store = :memory_store
config.public_file_server.headers = {
Expand Down
8 changes: 5 additions & 3 deletions config/schedule.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
set :output, "#{Rails.root}/log/whenever.log"
env :PATH, ENV['PATH']

every 1.minute do
runner "TwitterApi::Tasks::SearchAndUpsertTweets.execute(search_word: '#幻水総選挙2018')"
end
if @environment.to_sym == :production
every 1.minute, roles: [:batch] do
runner "TwitterApi::Tasks::SearchAndUpsertTweets.execute(search_word: '#幻水総選挙2018')"
end
end

0 comments on commit c463d62

Please sign in to comment.