Class: Debci::Experiment
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Debci::Experiment
- Defined in:
- lib/debci/experiment.rb
Instance Method Summary collapse
Instance Method Details
#packages ⇒ Object
15 16 17 |
# File 'lib/debci/experiment.rb', line 15 def packages @packages ||= Debci::Package.where(**self.package_selector) end |
#start ⇒ Object
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/debci/experiment.rb', line 19 def start packages.each do |package| control_job = Debci::Job.create!( suite: suite, arch: arch, package: package, requestor: owner, **Hash(self.control_parameters) ) test_job = Debci::Job.create!( suite: suite, arch: arch, package: package, requestor: owner, **Hash(self.test_parameters), ) tests.create!(control_job: control_job, test_job: test_job) control_job.enqueue(priority) test_job.enqueue(priority) end update(started_at: Time.now) end |
#started? ⇒ Boolean
42 43 44 |
# File 'lib/debci/experiment.rb', line 42 def started? !started_at.blank? end |