fix over queue at resque
This commit is contained in:
1 parent
1278581a82
commit
4014f8ee47
4 files changed
+9
-6
No files matched your search
@@ -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
@@ -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
|
||||
Reference in new issue
Block a user