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

Side by Side Diff: appengine/swarming/server/task_request.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 """Tasks definition. 6 """Tasks definition.
7 7
8 Each user request creates a new TaskRequest. The TaskRequest instance saves the 8 Each user request creates a new TaskRequest. The TaskRequest instance saves the
9 metadata of the request, e.g. who requested it, when why, etc. It links to the 9 metadata of the request, e.g. who requested it, when why, etc. It links to the
10 actual data of the request in a TaskProperties. The TaskProperties represents 10 actual data of the request in a TaskProperties. The TaskProperties represents
11 everything needed to run the task. 11 everything needed to run the task.
12 12
13 This means if two users request an identical task, it can be deduped 13 This means if two users request an identical task, it can be deduped
14 accordingly and efficiently by the scheduler. 14 accordingly and efficiently by the scheduler.
(...skipping 741 matching lines...) Expand 10 before | Expand all | Expand 10 after
756 _put_request(request) 756 _put_request(request)
757 return request 757 return request
758 758
759 759
760 def validate_priority(priority): 760 def validate_priority(priority):
761 """Throws ValueError if priority is not a valid value.""" 761 """Throws ValueError if priority is not a valid value."""
762 if 0 > priority or MAXIMUM_PRIORITY < priority: 762 if 0 > priority or MAXIMUM_PRIORITY < priority:
763 raise datastore_errors.BadValueError( 763 raise datastore_errors.BadValueError(
764 'priority (%d) must be between 0 and %d (inclusive)' % 764 'priority (%d) must be between 0 and %d (inclusive)' %
765 (priority, MAXIMUM_PRIORITY)) 765 (priority, MAXIMUM_PRIORITY))
OLDNEW
« no previous file with comments | « appengine/swarming/server/task_pack_test.py ('k') | appengine/swarming/server/task_request_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698