Skip to content

Commit

Permalink
Merge branch 'release/0.17.12.6'
Browse files Browse the repository at this point in the history
  • Loading branch information
kalashnikovisme committed May 14, 2017
2 parents 2d0c2e7 + 7bc759f commit d5439b8
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 deletions.
14 changes: 14 additions & 0 deletions cm/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,3 +107,17 @@
shell: "/usr/local/rvm/bin/rvm ruby-2.3.0 do bundle exec sidekiq -d -P /srv/ulmicru/shared/tmp/pids/sidekiq-0.pid -L /srv/ulmicru/shared/log/sidekiq.log"
args:
chdir: "{{ release_path }}"

- name: News views updating cron task
cron:
name: "News views updating"
minute: 10
hour: 4
job: "/bin/bash -l -c 'cd /srv/ulmicru/current && RAILS_ENV=production bundle exec rake news:update_views_count'"

- name: Member main position update task
cron:
name: "Member main position updating"
minute: 10
hour: 6
job: "/bin/bash -l -c 'cd /srv/ulmicru/current && RAILS_ENV=production bundle exec rake members:update_member_main_position'"
7 changes: 1 addition & 6 deletions lib/tasks/cron/update_members_position.rake
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,7 @@ namespace :members do
count = Member.confirmed.count
Member.confirmed.find_each.with_index do |member, index|
main_position_title = member.decorate.main_position_title
unless member.update_attributes main_position_title: main_position_title
puts member.id
puts member.email
puts member.errors.messages
break
end
member.update_attributes! main_position_title: main_position_title
print "#{index} of #{count}\r"
end
puts "Members updated!"
Expand Down

0 comments on commit d5439b8

Please sign in to comment.