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

Side by Side Diff: appengine/swarming/server/task_to_run.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 # coding=utf-8 1 # coding=utf-8
2 # Copyright 2014 The LUCI Authors. All rights reserved. 2 # Copyright 2014 The LUCI Authors. All rights reserved.
3 # Use of this source code is governed by the Apache v2.0 license that can be 3 # Use of this source code is governed under the Apache License, Version 2.0
4 # found in the LICENSE file. 4 # that can be found in the LICENSE file.
5 5
6 """Task entity that describe when a task is to be scheduled. 6 """Task entity that describe when a task is to be scheduled.
7 7
8 This module doesn't do the scheduling itself. It only describes the tasks ready 8 This module doesn't do the scheduling itself. It only describes the tasks ready
9 to be scheduled. 9 to be scheduled.
10 10
11 Graph of the schema: 11 Graph of the schema:
12 12
13 +--------Root---------+ 13 +--------Root---------+
14 |TaskRequest | (task_request.py) 14 |TaskRequest | (task_request.py)
(...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after
453 too_long, 453 too_long,
454 deadline) 454 deadline)
455 455
456 456
457 def yield_expired_task_to_run(): 457 def yield_expired_task_to_run():
458 """Yields all the expired TaskToRun still marked as available.""" 458 """Yields all the expired TaskToRun still marked as available."""
459 now = utils.utcnow() 459 now = utils.utcnow()
460 for task in TaskToRun.query().filter(TaskToRun.queue_number > 0): 460 for task in TaskToRun.query().filter(TaskToRun.queue_number > 0):
461 if task.expiration_ts < now: 461 if task.expiration_ts < now:
462 yield task 462 yield task
OLDNEW
« no previous file with comments | « appengine/swarming/server/task_scheduler_test.py ('k') | appengine/swarming/server/task_to_run_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698