Skip to content

Commit

Permalink
allow auto_cores to be fixed (#3768)
Browse files Browse the repository at this point in the history
  • Loading branch information
ashton22305 authored Aug 30, 2024
1 parent b3b3646 commit 0f70d8c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion apps/dashboard/app/controllers/launchers_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ class LaunchersController < ApplicationController

SAVE_SCRIPT_KEYS = [
:cluster, :auto_accounts, :auto_accounts_exclude, :auto_accounts_fixed,
:auto_cores, :auto_scripts, :auto_scripts_exclude, :auto_scripts_fixed,
:auto_cores, :auto_cores_fixed, :auto_cores_min, :auto_cores_max,
:auto_scripts, :auto_scripts_exclude, :auto_scripts_fixed,
:auto_queues, :auto_queues_exclude, :auto_queues_fixed,
:auto_batch_clusters, :auto_batch_clusters_exclude, :auto_batch_clusters_fixed,
:bc_num_slots, :bc_num_slots_fixed, :bc_num_slots_min, :bc_num_slots_max,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ def self.build_auto_cores(opts = {})

module Attributes
class AutoCores < Attribute
def opts
@opts.reverse_merge(min: 1, step: 1)
def initialize(id, opts)
super(id, opts)
@opts = @opts.reverse_merge(min: 1, step: 1)
end

def widget
Expand Down

0 comments on commit 0f70d8c

Please sign in to comment.