Class: Debci::Backend

Inherits:
Object
  • Object
show all
Defined in:
lib/debci/backend.rb

Class Method Summary collapse

Class Method Details

.select(package, arch) ⇒ Object

Select which backend to use for the given package. The backend specified in the package backend attribute will be used if that backend is available for the given architecture, or otherwise the default backend will be used as a fallback.



10
11
12
13
14
15
16
# File 'lib/debci/backend.rb', line 10

def self.select(package, arch)
  if package.backend && Debci::AMQP.queue_exists?(arch, package.backend)
    package.backend
  else
    Debci.config.backend
  end
end