Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(299)

Side by Side Diff: appengine/swarming/server/lease_management.py

Issue 2013943002: Changing license header, again! (Closed) Base URL: git@github.com:luci/luci-py.git@master
Patch Set: Fixed third parties Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 # Copyright 2016 The LUCI Authors. All rights reserved. 1 # Copyright 2016 The LUCI Authors. All rights reserved.
2 # Use of this source code is governed by the Apache v2.0 license that can be 2 # Use of this source code is governed under the Apache License, Version 2.0
3 # found in the LICENSE file. 3 # that can be found in the LICENSE file.
4 4
5 """Lease management for machines leased from the Machine Provider. 5 """Lease management for machines leased from the Machine Provider.
6 6
7 Keeps a list of machine types which should be leased from the Machine Provider 7 Keeps a list of machine types which should be leased from the Machine Provider
8 and the list of machines of each type currently leased. 8 and the list of machines of each type currently leased.
9 9
10 Swarming integration with Machine Provider 10 Swarming integration with Machine Provider
11 ========================================== 11 ==========================================
12 12
13 handlers_backend.py contains a cron job which looks at each machine type and 13 handlers_backend.py contains a cron job which looks at each machine type and
(...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after
453 num_futures = len(futures) 453 num_futures = len(futures)
454 if num_futures < MAX_IN_FLIGHT: 454 if num_futures < MAX_IN_FLIGHT:
455 futures.extend( 455 futures.extend(
456 process_message(message, subscription) 456 process_message(message, subscription)
457 for message in messages[:MAX_IN_FLIGHT - num_futures]) 457 for message in messages[:MAX_IN_FLIGHT - num_futures])
458 messages = messages[MAX_IN_FLIGHT - num_futures:] 458 messages = messages[MAX_IN_FLIGHT - num_futures:]
459 ndb.Future.wait_any(futures) 459 ndb.Future.wait_any(futures)
460 futures = [future for future in futures if not future.done()] 460 futures = [future for future in futures if not future.done()]
461 if futures: 461 if futures:
462 ndb.Future.wait_all(futures) 462 ndb.Future.wait_all(futures)
OLDNEW
« no previous file with comments | « appengine/swarming/server/config_test.py ('k') | appengine/swarming/server/lease_management_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698