fix over queue at resque

This commit is contained in:
Matthew K. Fu JuYuan committed 2012-07-03 10:51:26 +08:00
1 parent 1278581a82
commit 4014f8ee47
4 files changed
+9 -6

No files matched your search

+1 -1
View File
@@ -16,6 +16,6 @@ end
# FileUtils.mv(temp_file, File.join(Rails.root, 'public/static', 'nccu_calendar.xml'))
puts "NccuCalendar Synced4"
puts "[#{ DateTime.now.strftime("%Y %D %H:%M")}]NccuCalendar Synced"
end
end
+3 -2
View File
@@ -3,6 +3,7 @@ class SyncDb
@queue = :high
def self.perform()
puts "[ #{DateTime.now.strftime("%Y %D %H:%M") }]\t SyncDb Starting"
self.start_sync
self.set_admin
end
@@ -12,13 +13,13 @@ class SyncDb
args = []
%x[rake #{task} --trace >> #{Rails.root}/log/rake.log]
User.all.each{|ur| ur.create_dept_cache}
puts "SyncDb Synced"
puts "[#{ DateTime.now.strftime("%Y %D %H:%M")}]\tSyncDb Synced"
end
def self.set_admin
task = 'mid_site:install_admin'
args = []
%x[rake #{task} --trace >> #{Rails.root}/log/rake.log]
puts "Admin done"
puts "[#{ DateTime.now.strftime("%Y %D %H:%M")}]\tAdmin done"
end
end