lib/right_chimp/queue/ExecutionGroup.rb in right_chimp-1.1.3 vs lib/right_chimp/queue/ExecutionGroup.rb in right_chimp-2.0
- old
+ new
@@ -69,15 +69,14 @@
#
def results
return self.get_jobs.map do |task|
next if task == nil
next if task.server == nil
-
{
:job_id => task.job_id,
- :name => task.info,
- :host => task.server['nickname'] || task.server['name'],
+ :name => task.info[0],
+ :host => task.server.name,
:status => task.status,
:error => task.error,
:total => self.get_total_execution_time(task.status, task.time_start, task.time_end),
:start => task.time_start,
:end => task.time_end,
@@ -97,11 +96,11 @@
# Sort queue by server nickname
#
def sort!
if @queue != nil
@queue.sort! do |a,b|
- a.server['nickname'] <=> b.server['nickname']
+ a.server.nickname <=> b.server.nickname
end
end
end
#
@@ -287,13 +286,9 @@
def initialize(new_group_id)
super(new_group_id)
@concurrency = 25
end
- #
- # FIXME - we're not currently using the @concurrency setting to limit execution
- # due to an unknown bug...
- #
def ready?
return (get_jobs_by_status(Executor::STATUS_NONE).size > 0) # and get_jobs_by_status(Executor::STATUS_RUNNING).size < @concurrency)
end
def short_name