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

Unified Diff: appengine/swarming/message_conversion.py

Issue 2661173004: Make deleted bots still show up when searched for by id (Closed)
Patch Set: Address comments Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « appengine/swarming/handlers_endpoints_test.py ('k') | appengine/swarming/swarming_rpcs.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: appengine/swarming/message_conversion.py
diff --git a/appengine/swarming/message_conversion.py b/appengine/swarming/message_conversion.py
index 62327a3fcb25640c4960fb888337f69db731be65..0df9c51aed13b6771aa101a291a963e2a05604d5 100644
--- a/appengine/swarming/message_conversion.py
+++ b/appengine/swarming/message_conversion.py
@@ -70,7 +70,7 @@ def epoch_to_datetime(value):
raise ValueError(e)
-def bot_info_to_rpc(entity, now):
+def bot_info_to_rpc(entity, now, deleted=False):
""""Returns a swarming_rpcs.BotInfo from a bot.BotInfo."""
return _ndb_to_rpc(
swarming_rpcs.BotInfo,
@@ -78,6 +78,7 @@ def bot_info_to_rpc(entity, now):
dimensions=_string_list_pairs_from_dict(entity.dimensions),
is_dead=entity.is_dead(now),
bot_id=entity.id,
+ deleted=deleted,
state=json.dumps(entity.state, sort_keys=True, separators=(',', ':')))
« no previous file with comments | « appengine/swarming/handlers_endpoints_test.py ('k') | appengine/swarming/swarming_rpcs.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698