Skip to content

Commit

Permalink
999075-dist-events - fix bug and update method for updating distribut…
Browse files Browse the repository at this point in the history
…or tasks

999075-dist-events - removed TaskStatus.refresh() call from distributor.rb since only applies to pulp

999075-dist-events - ...and removing the now-useless wrapper method in distributor.rb
  • Loading branch information
thomasmckay committed Aug 28, 2013
1 parent 602d265 commit bda92e2
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 20 deletions.
6 changes: 0 additions & 6 deletions app/lib/navigation/content_menu.rb
Expand Up @@ -472,12 +472,6 @@ def distributors_subnav
:if => lambda{@distributor},
:options => {:class=>"third_level panel_link"},
},
{ :key => :custom_info,
:name => _("Custom Information"),
:url => lambda{custom_info_system_path(@distributor.id)},
:if => lambda{@system},
:options => {:class => "third_level panel_link"}
},
{ :key => :custom_info,
:name => _("Custom Information"),
:url => lambda{custom_info_distributor_path(@distributor.id)},
Expand Down
4 changes: 3 additions & 1 deletion app/models/distributor.rb
Expand Up @@ -92,7 +92,8 @@ def init_default_custom_info
end

def tasks
TaskStatus.refresh_for_distributor(self)
import_candlepin_tasks
self.task_statuses
end

# A rollback occurred while attempting to create the distributor; therefore, perform necessary cleanup.
Expand All @@ -104,6 +105,7 @@ def rollback_on_create
end

private

def save_task_status pulp_task, task_type, parameters_type, parameters
# TODO: remove entirely from distributor model, or need to keep as stub?
end
Expand Down
13 changes: 0 additions & 13 deletions app/models/task_status.rb
Expand Up @@ -306,19 +306,6 @@ def rmi_error_description

end

def self.refresh_for_system(system_id)
system = System.find(system_id)

return self.refresh_for_candlepin_consumer('System', system_id, system)
end

def self.refresh_for_distributor(distributor_id)
distributor = System.find(distributor_id)

return self.refresh_for_candlepin_consumer('Distributor', distributor_id, distributor)

end

def self.refresh(ids)
unless ids.blank?
uuids = TaskStatus.where(:id=>ids).pluck(:uuid)
Expand Down

0 comments on commit bda92e2

Please sign in to comment.