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() |