[issue #430] Changed task
This commit is contained in:
parent
1a9f529152
commit
b74dd01262
|
@ -99,10 +99,8 @@ class BuildList < ActiveRecord::Base
|
|||
before_create :set_default_status
|
||||
after_create :place_build
|
||||
|
||||
class << self
|
||||
def human_status(status)
|
||||
I18n.t("layout.build_lists.statuses.#{HUMAN_STATUSES[status]}")
|
||||
end
|
||||
def self.human_status(status)
|
||||
I18n.t("layout.build_lists.statuses.#{HUMAN_STATUSES[status]}")
|
||||
end
|
||||
|
||||
def human_status
|
||||
|
|
|
@ -8,11 +8,7 @@ namespace :buildlist do
|
|||
outdated = BuildList.outdated
|
||||
say "There are #{outdated.count} outdated BuildLists at #{Time.now}"
|
||||
|
||||
begin
|
||||
BuildList.outdated.map(&:destroy)
|
||||
rescue Exception => e
|
||||
say "There was an error: #{e.message}"
|
||||
end
|
||||
BuildList.outdated.destroy_all
|
||||
|
||||
say "Outdated BuildLists was successfully removed"
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue