minor improvement
This commit is contained in:
@ -5,7 +5,7 @@ module Admin
|
||||
end
|
||||
|
||||
def docker_data
|
||||
ExecutionEnvironment.order(:id).select(:id, :permitted_execution_time, :pool_size).map do |execution_environment|
|
||||
ExecutionEnvironment.order(:id).select(:id, :pool_size).map do |execution_environment|
|
||||
execution_environment.attributes.merge(quantity: DockerContainerPool.quantities[execution_environment.id])
|
||||
end
|
||||
end
|
||||
|
@ -19,8 +19,8 @@ class ExecutionEnvironment < ActiveRecord::Base
|
||||
validates :run_command, presence: true
|
||||
|
||||
def set_default_values
|
||||
self.permitted_execution_time ||= 60
|
||||
self.pool_size ||= 0
|
||||
self.permitted_execution_time ||= 60 if has_attribute?(:permitted_execution_time)
|
||||
self.pool_size ||= 0 if has_attribute?(:pool_size)
|
||||
end
|
||||
private :set_default_values
|
||||
|
||||
|
Reference in New Issue
Block a user