orbit-basic/app/jobs/sync_db.rb

24 lines
424 B
Ruby
Raw Normal View History

class SyncDb
@queue = :high
def self.perform()
2012-05-09 05:58:19 +00:00
self.start_sync
self.set_admin
2012-05-09 05:58:19 +00:00
end
def self.start_sync
task = 'mid_site:sync'
args = []
%x[rake #{task} --trace >> #{Rails.root}/log/rake.log]
puts "SyncDb Synced"
end
def self.set_admin
task = 'mid_site:install_admin'
args = []
%x[rake #{task} --trace >> #{Rails.root}/log/rake.log]
puts "Admin done"
end
end