Class: Chimp::ParallelExecutionGroup
- Inherits:
-
ExecutionGroup
- Object
- ExecutionGroup
- Chimp::ParallelExecutionGroup
- Defined in:
- lib/right_chimp/queue/ExecutionGroup.rb
Overview
ParallelExecutionGroup: run multiple jobs at once
Instance Attribute Summary
Attributes inherited from ExecutionGroup
#concurrency, #description, #group_id, #time_end, #time_start
Instance Method Summary collapse
-
#initialize(new_group_id) ⇒ ParallelExecutionGroup
constructor
A new instance of ParallelExecutionGroup.
-
#ready? ⇒ Boolean
FIXME - we’re not currently using the @concurrency setting to limit execution due to an unknown bug…
- #short_name ⇒ Object
Methods inherited from ExecutionGroup
#cancel, #done?, #get_job, #get_job_ids, #get_jobs, #get_jobs_by_status, #get_total_exec_time, #job_completed, #push, #queue, #requeue, #requeue_failed_jobs!, #reset!, #results, #running?, #set_jobs, #shift, #size, #sort!, #to_s
Constructor Details
#initialize(new_group_id) ⇒ ParallelExecutionGroup
Returns a new instance of ParallelExecutionGroup.
286 287 288 289 |
# File 'lib/right_chimp/queue/ExecutionGroup.rb', line 286 def initialize(new_group_id) super(new_group_id) @concurrency = 25 end |
Instance Method Details
#ready? ⇒ Boolean
FIXME - we’re not currently using the @concurrency setting to limit execution
due to an unknown bug...
295 296 297 |
# File 'lib/right_chimp/queue/ExecutionGroup.rb', line 295 def ready? return (get_jobs_by_status(Executor::STATUS_NONE).size > 0) # and get_jobs_by_status(Executor::STATUS_RUNNING).size < @concurrency) end |
#short_name ⇒ Object
299 300 301 |
# File 'lib/right_chimp/queue/ExecutionGroup.rb', line 299 def short_name "P" end |