Sha256: 36d09e9a2ee5760de86b6cb8924a0b0e5d0e9c576c5a5f08944316931b72343d

Contents?: true

Size: 1.29 KB

Versions: 43

Compression:

Stored size: 1.29 KB

Contents

# encoding: utf-8
module Mutx
  module Results

    def self.all_results_for task_id
      Mutx::Database::MongoConnector.results_for task_id
    end

    def self.results_ids_for task_id
      all_results_for(task_id).map do |result|
        result["_id"]
      end
    end

    def self.running_results_for_task_id task_id
      Mutx::Database::MongoConnector.running_results_for_task_id task_id
    end

    def self.all_results_ids
      Mutx::Database::MongoConnector.all_results_ids
    end

    def self.find_for key
      Mutx::Database::MongoConnector.find_results_for_key key
    end

    def self.find_for_status status
      Mutx::Database::MongoConnector.find_results_for_status status
    end

    def self.find_for_task task_name
      Mutx::Database::MongoConnector.find_results_for_task task_name
    end

    def self.all_results
      Mutx::Database::MongoConnector.all_results
    end

    def self.find_all_for_key key
      Mutx::Database::MongoConnector.find_results_for_key key
    end

    # Resets all results with running status
    def self.reset!
      Mutx::Database::MongoConnector.running_results.each do |result|
        Mutx::Support::Processes.kill_p(result["pid"]) if result["pid"]
        res = Mutx::Results::Result.get(result["_id"])
        res.reset!
      end
    end

  end
end

Version data entries

43 entries across 43 versions & 1 rubygems

Version Path
mutx-0.1.69 lib/mutx/results/results.rb
mutx-0.1.68 lib/mutx/results/results.rb
mutx-0.1.67 lib/mutx/results/results.rb
mutx-0.1.66 lib/mutx/results/results.rb
mutx-0.1.65 lib/mutx/results/results.rb
mutx-0.1.64 lib/mutx/results/results.rb
mutx-0.1.63 lib/mutx/results/results.rb
mutx-0.1.62 lib/mutx/results/results.rb
mutx-0.1.61 lib/mutx/results/results.rb
mutx-0.1.60 lib/mutx/results/results.rb
mutx-0.1.59 lib/mutx/results/results.rb
mutx-0.1.58 lib/mutx/results/results.rb
mutx-0.1.57 lib/mutx/results/results.rb
mutx-0.1.56 lib/mutx/results/results.rb
mutx-0.1.55 lib/mutx/results/results.rb
mutx-0.1.54 lib/mutx/results/results.rb
mutx-0.1.53 lib/mutx/results/results.rb
mutx-0.1.52 lib/mutx/results/results.rb
mutx-0.1.51 lib/mutx/results/results.rb
mutx-0.1.50 lib/mutx/results/results.rb