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

Unified Diff: appengine/predator/app/common/model/crash_analysis.py

Issue 2447253002: [Findit & Predator] Code reorg of Findit. (Closed)
Patch Set: Clean up. Created 4 years, 1 month 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
Index: appengine/predator/app/common/model/crash_analysis.py
diff --git a/appengine/predator/app/common/model/crash_analysis.py b/appengine/predator/app/common/model/crash_analysis.py
new file mode 100644
index 0000000000000000000000000000000000000000..1ae2590b4efde80ae800de6c8f2ecb42f736c197
--- /dev/null
+++ b/appengine/predator/app/common/model/crash_analysis.py
@@ -0,0 +1,20 @@
+from google.appengine.ext import ndb
Sharu Jiang 2016/11/04 18:39:46 So the common/ here is for things shared by fracas
stgao 2016/11/08 18:53:32 These are the models/etc that have to be shared be
+
+from gae_libs.model import versioned_model
+
+class CrashAnalysis(versioned_model.VersionedModel):
+ signature = ndb.StringProperty(indexed=False)
+
+ stacktrace = ndb.StringProperty(indexed=False)
+
+ @classmethod
+ def CreateKey(cls, signature):
+ return ndb.Key(cls, signature)
+
+ @classmethod
+ def Create(cls, signature):
+ return cls(key=cls.CreateKey(signature), signature=signature)
+
+ @classmethod
+ def Get(cls, signature):
+ return cls.CreateKey(signature).get()

Powered by Google App Engine
This is Rietveld 408576698