Skip to content

Commit

Permalink
[api] do not update backendinfo for locked packages, but do so on unl…
Browse files Browse the repository at this point in the history
…ock if needed
  • Loading branch information
adrianschroeter committed Mar 2, 2015
1 parent 642688c commit 05809ce
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/api/app/jobs/update_backend_infos.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ def initialize(event)

def update_pkg(pkg)
return if self.checked_pkgs.has_key? pkg.id
return if pkg.project.is_locked?
pkg.update_backendinfo
self.checked_pkgs[pkg.id] = 1
BackendPackage.where(links_to_id: pkg.id).find_each do |p|
Expand Down
2 changes: 2 additions & 0 deletions src/api/app/models/project.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1380,6 +1380,8 @@ def unlock(comment=nil)
Suse::Backend.post "/build/#{URI.escape(self.name)}?cmd=wipe", nil
end
end

update_packages_if_dirty
end

def unlock_by_request(id)
Expand Down

0 comments on commit 05809ce

Please sign in to comment.