Class: Debci::Backend
- Inherits:
-
Object
- Object
- Debci::Backend
- Defined in:
- lib/debci/backend.rb
Class Method Summary collapse
- .default ⇒ Object
-
.select(package, arch) ⇒ Object
Select which backend to use for the given package.
Class Method Details
.default ⇒ Object
18 19 20 |
# File 'lib/debci/backend.rb', line 18 def self.default Debci.config.backend end |
.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 default end end |