Skip to content

Commit

Permalink
Merge pull request #167 from mattkirby/migrate_at_checkout
Browse files Browse the repository at this point in the history
Improve vmpooler scheduling logic
  • Loading branch information
mattkirby authored Nov 22, 2016
2 parents 3e3bc6f + 02327df commit 705e5d2
Show file tree
Hide file tree
Showing 8 changed files with 517 additions and 284 deletions.
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ gem 'statsd-ruby', '>= 1.3.0', :require => 'statsd'

# Test deps
group :test do
gem 'mock_redis', '>= 0.17.0'
gem 'rack-test', '>= 0.6'
gem 'rspec', '>= 3.2'
gem 'simplecov', '>= 0.11.2'
Expand Down
1 change: 1 addition & 0 deletions lib/vmpooler/api/v1.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ def return_vm_to_ready_state(template, vm)

def account_for_starting_vm(template, vm)
backend.sadd('vmpooler__running__' + template, vm)
backend.sadd('vmpooler__migrating__' + template, vm)
backend.hset('vmpooler__active__' + template, vm, Time.now)
backend.hset('vmpooler__vm__' + vm, 'checkout', Time.now)

Expand Down
Loading

0 comments on commit 705e5d2

Please sign in to comment.