Sha256: 3c2ae121766ef65d75b20326ace44bf10d95e36b817c15b8b5d671da9bc10f72
Contents?: true
Size: 1.39 KB
Versions: 10
Compression:
Stored size: 1.39 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.status_for result_id Mutx::Database::MongoConnector.status_for_result result_id 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
10 entries across 10 versions & 1 rubygems