Parent

UbiquoJobs::Managers::Base

Public Class Methods

add(type, options = {}) click to toggle source

Creates a job using the given options, and planifies it to be run according to the planification options. Returns the newly created job

  type: class type of the desired job
  options: properties for the new job
    # File vendor/plugins/ubiquo_jobs/lib/ubiquo_jobs/managers/base.rb, line 52
52:       def self.add(type, options = {})
53:         raise NotImplementedError.new("Implement add(runner) in your Manager.")
54:       end
delete(job_id) click to toggle source

Deletes a the job that has the given identifier Returns true if successfully deleted, false otherwise

  job_id: job identifier
    # File vendor/plugins/ubiquo_jobs/lib/ubiquo_jobs/managers/base.rb, line 61
61:       def self.delete(job_id)
62:         raise NotImplementedError.new("Implement delete(job_id) in your Manager.")
63:       end
get(runner) click to toggle source

Get the most appropiate job to run, depending job priorities, states dependencies and planification dates

  runner: name of the worker that is asking for a job
    # File vendor/plugins/ubiquo_jobs/lib/ubiquo_jobs/managers/base.rb, line 10
10:       def self.get(runner)
11:         raise NotImplementedError.new("Implement get(runner) in your Manager.")
12:       end
get_assigned(runner) click to toggle source

Get an already assigned task for a given runner, or nil if that runner does not have any assigned task

  runner: name of the worker that is asking for a job
    # File vendor/plugins/ubiquo_jobs/lib/ubiquo_jobs/managers/base.rb, line 19
19:       def self.get_assigned(runner)
20:         raise NotImplementedError.new("Implement get_assigned(runner) in your Manager.")        
21:       end
get_by_id(job_id) click to toggle source

Get the job instance that has the given job_id

  job_id: job identifier
    # File vendor/plugins/ubiquo_jobs/lib/ubiquo_jobs/managers/base.rb, line 27
27:       def self.get_by_id(job_id)
28:         raise NotImplementedError.new("Implement get_by_id(runner) in your Manager.")
29:       end
job_class() click to toggle source

Return the job class that the manager is using, as a constant

  type: class type of the desired job
  options: properties for the new job
    # File vendor/plugins/ubiquo_jobs/lib/ubiquo_jobs/managers/base.rb, line 88
88:       def self.job_class
89:         raise NotImplementedError.new("Implement job_class() in your Manager.")
90:       end
list(filters = {}) click to toggle source

Get an array of jobs matching filters

  filters: hash of properties that the jobs must fullfill, and/or the following options:
    {
      :order => list order, sql syntax
      :page => number of the asked page, for pagination
      :per_page => number per_page job elements (default 10)
    }

Returns an array with the format [pages_information, list_of_jobs]

    # File vendor/plugins/ubiquo_jobs/lib/ubiquo_jobs/managers/base.rb, line 41
41:       def self.list(filters = {})
42:         raise NotImplementedError.new("Implement get(runner) in your Manager.")
43:       end
repeat(job_id) click to toggle source

Marks the job with the given identifier to be repeated

  job_id: job identifier
    # File vendor/plugins/ubiquo_jobs/lib/ubiquo_jobs/managers/base.rb, line 79
79:       def self.repeat(job_id)
80:         raise NotImplementedError.new("Implement repeat(job_id) in your Manager.")
81:       end
update(job_id, options) click to toggle source

Updates the existing job that has the given identifier Returns true if successfully updated, false otherwise

  job_id: job identifier
  options: a hash with the changed properties
    # File vendor/plugins/ubiquo_jobs/lib/ubiquo_jobs/managers/base.rb, line 71
71:       def self.update(job_id, options)
72:         raise NotImplementedError.new("Implement update(job_id) in your Manager.")
73:       end

Disabled; run with $DEBUG to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.