783b8c5169b0 — Peter Sanchez 13 years ago
Added mark_complete
2 files changed, 9 insertions(+), 0 deletions(-)

M callback/callback.py
M callback/models.py
M callback/callback.py +1 -0
@@ 53,6 53,7 @@ class CallbackManager(object):
         cls = self.get_callback_class(model)
         try:
             cls.process(model)
+            callback_instance.mark_complete()
         except Exception, e:
             callback_instance.mark_error(str(e))
             raise CallbackException(str(e))

          
M callback/models.py +8 -0
@@ 22,6 22,14 @@ class CallbackMap(models.Model):
     objects = CallbackMapManager()
 
     # Methods
+    def __unicode__(self):
+        return self.hash_id
+
+    def mark_complete(self):
+        self.is_active = False
+        self.is_error = False
+        self.save()
+
     def mark_error(self, msg):
         self.is_active = False
         self.is_error = True