orbit-basic/app/jobs/sync_db.rb

17 lines
288 B
Ruby
Raw Normal View History

class SyncDb
@queue = :high
def self.perform()
self.start_sync
end
def self.start_sync
task = 'mid_site:sync'
args = []
%x[rake #{task} --trace >> #{Rails.root}/log/rake.log]
2012-05-22 09:57:45 +00:00
User.all.each{|ur| ur.create_dept_cache}
puts "SyncDb Synced"
end
end