Skip to content
Browse files

Fixed a small bug with the generation rake task

  • Loading branch information...
1 parent 221a758 commit d9be425bc624b26bd66335c85c74b24951c68ee4 Harry Brundage committed
Showing with 20 additions and 10 deletions.
  1. +20 −10 lib/darwin/tasks.rb
View
30 lib/darwin/tasks.rb
@@ -37,8 +37,6 @@
search.advance_generation
search.evaluate_generation
end
- else
- return
end
end
@@ -50,15 +48,27 @@
c.save!
end
end
-
- Finch::Chromosome.where(:enqueued => false).each do |c|
- if c.scores.length < 10
- c.queue_fitness_games
- end
- c.enqueued = true
- c.save!
- end
+ #
+ # Finch::Chromosome.where(:enqueued => false).each do |c|
+ # if c.scores.length < 10
+ # c.queue_fitness_games
+ # end
+ # c.enqueued = true
+ # c.save!
+ # end
+
+ # Finch::Chromosome.where(:fitness => nil).each do |c|
+ # if c.scores.length > 10
+ # c.queue_fitness_calculations
+ # c.complete = true
+ # else
+ # c.queue_fitness_games
+ # end
+ # c.enqueued = true
+ # c.save!
+ # end
end
+
desc "Restart Resque workers"
task :kill_workers do
pids = Resque.workers.map do |worker|

0 comments on commit d9be425

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