Skip to content
Browse files

fix for shutdown_after_complete default logic

  • Loading branch information...
1 parent 8c643f9 commit 22dda6840a7bfcbe0ec02c565a2d7f1d6aa04f25 Pete Skomoroch committed May 29, 2009
Showing with 3 additions and 5 deletions.
  1. +1 −3 app/models/job.rb
  2. +1 −1 db/migrate/20090424223826_create_jobs.rb
  3. +1 −1 db/schema.rb
View
4 app/models/job.rb
@@ -7,9 +7,7 @@ class Job < ActiveRecord::Base
# see http://www.jroller.com/obie/entry/default_values_for_activerecord_attributes
# The default setting is for the cluster to shut itself down when the job completes
- def shutdown_after_complete
- self[:shutdown_after_complete] or true
- end
+ # but this is set in the database schema...
# Use default base 32 bit Ubuntu amis
# see http://alestic.com/ for details
View
2 db/migrate/20090424223826_create_jobs.rb
@@ -11,7 +11,7 @@ def self.up
t.text :commands
t.string :output_path
t.text :output_files
- t.boolean :shutdown_after_complete
+ t.boolean :shutdown_after_complete, :default => 1
t.string :master_ami_id
t.string :worker_ami_id
t.string :log_path
View
2 db/schema.rb
@@ -35,7 +35,7 @@
t.text "commands"
t.string "output_path"
t.text "output_files"
- t.boolean "shutdown_after_complete"
+ t.boolean "shutdown_after_complete", :default => true
t.string "master_ami_id"
t.string "worker_ami_id"
t.string "log_path"

0 comments on commit 22dda68

Please sign in to comment.
Something went wrong with that request. Please try again.