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

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

Issue 1860863002: Update copyright notice from Swarming to LUCI; add AUTHORS and CONTRIBUTORS. (Closed) Base URL: git@github.com:luci/luci-py.git@master
Patch Set: . Created 4 years, 8 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
« no previous file with comments | « appengine/swarming/server/stats_test.py ('k') | appengine/swarming/server/task_pack_test.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # coding: utf-8 1 # coding: utf-8
2 # Copyright 2015 The Swarming Authors. All rights reserved. 2 # Copyright 2015 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 by the Apache v2.0 license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 """Packing and unpacking of ndb.Key. 6 """Packing and unpacking of ndb.Key.
7 7
8 End users are only given packed keys, which permits to not expose internal 8 End users are only given packed keys, which permits to not expose internal
9 schema details to the user. 9 schema details to the user.
10 """ 10 """
11 11
12 from google.appengine.ext import ndb 12 from google.appengine.ext import ndb
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 """Returns the TaskRunResult ndb.Key from a packed key. 160 """Returns the TaskRunResult ndb.Key from a packed key.
161 161
162 The expected format of |packed_key| is %x. 162 The expected format of |packed_key| is %x.
163 """ 163 """
164 request_key = unpack_request_key(packed_key[:-1]) 164 request_key = unpack_request_key(packed_key[:-1])
165 run_id = int(packed_key[-1], 16) 165 run_id = int(packed_key[-1], 16)
166 if not run_id: 166 if not run_id:
167 raise ValueError('Can\'t reference to the overall task result.') 167 raise ValueError('Can\'t reference to the overall task result.')
168 result_summary_key = request_key_to_result_summary_key(request_key) 168 result_summary_key = request_key_to_result_summary_key(request_key)
169 return result_summary_key_to_run_result_key(result_summary_key, run_id) 169 return result_summary_key_to_run_result_key(result_summary_key, run_id)
OLDNEW
« no previous file with comments | « appengine/swarming/server/stats_test.py ('k') | appengine/swarming/server/task_pack_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698